sindresorhus/refined-github

Auto-delete merged PRs should be disabled by default #2710

qbunt posted onGitHub

<!-- Thanks for contributing! 🏓 -->

Auto deleting anything without the user's knowledge is a a pretty high-risk default, especially if the user cannot restore the branch. I did not know this was a feature of refined-github, and seeing this in action, I've since uninstalled.

I think it's a great feature for those who need it, so it should stay, but on first install it should definitely not be active.


I've not seen an example of where you can delete the branch but not restore it, can you explain how this is possible?

posted by busches about 5 years ago

Some pull request pages don’t contain the restore button, so you have to go and either push again or something else just to get an active branch back.

As I said, I’m sure it’s needed by some. Enabling this on without warning the user seems dangerous.


From: Scott Busche notifications@github.com Sent: Friday, January 17, 2020 8:29 PM To: sindresorhus/refined-github Cc: Jeremy Bunting; Author Subject: Re: [sindresorhus/refined-github] Auto-delete merged PRs should be disabled by default (#2710)

I've not seen an example of where you can delete the branch but not restore it, can you explain how this is possible?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sindresorhus/refined-github/issues/2710?email_source=notifications&email_token=AABNVVY3XKFTLI4XSA5IBA3Q6JLOZA5CNFSM4KIQCC32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJJNBMA#issuecomment-575852720, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AABNVV76PYN73JJCNZIU2TTQ6JLOZANCNFSM4KIQCC3Q.

posted by qbunt about 5 years ago

Do you have an example of where you deleted it, you being the extension, and you can't restore it? This seems like a bug on GH.

On Sat, Jan 18, 2020, 7:14 AM Jeremy Bunting notifications@github.com wrote:

Some pull request pages don’t contain the restore button, so you have to go and either push again or something else just get an active branch back.

As I said, I’m sure it’s needed by some. Enabling this on without warning the user seems dangerous.


From: Scott Busche notifications@github.com Sent: Friday, January 17, 2020 8:29 PM To: sindresorhus/refined-github Cc: Jeremy Bunting; Author Subject: Re: [sindresorhus/refined-github] Auto-delete merged PRs should be disabled by default (#2710)

I've not seen an example of where you can delete the branch but not restore it, can you explain how this is possible?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://github.com/sindresorhus/refined-github/issues/2710?email_source=notifications&email_token=AABNVVY3XKFTLI4XSA5IBA3Q6JLOZA5CNFSM4KIQCC32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJJNBMA#issuecomment-575852720>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AABNVV76PYN73JJCNZIU2TTQ6JLOZANCNFSM4KIQCC3Q

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sindresorhus/refined-github/issues/2710?email_source=notifications&email_token=AAGRMZCMQN7GCNOON7AKPVTQ6L6CTA5CNFSM4KIQCC32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJJX67Y#issuecomment-575897471, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGRMZDTDRM3QRMCSLGB7C3Q6L6CTANCNFSM4KIQCC3Q .

posted by busches about 5 years ago

@busches, I don't have a specific example, our develop branch kept getting nuked and I couldn't figure out why.

posted by qbunt about 5 years ago

Looking at closed issues this has come up before and been closed with a similar discussion. Given that this keeps coming up, I think it's worth reconsidering as people keep getting surprised. I'll see myself out.

posted by qbunt about 5 years ago

That's why I'm after an example, I've never seen this behavior before and worked on a project for a long time with a lot of long lived feature branches.

You mentioned develop was getting nuked, is it a protected branch? And if yes, are you still able to delete it? If that's the case, then we should account for that and not auto delete a protected branch, just because you're an admin.

On Sat, Jan 18, 2020, 7:48 AM Jeremy Bunting notifications@github.com wrote:

Looking at closed issues this has come up before and been closed with a similar discussion. Given that this keeps coming up, I think it's worth reconsidering as people keep getting surprised. I'll see myself out.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sindresorhus/refined-github/issues/2710?email_source=notifications&email_token=AAGRMZCLUXIR22B5LGC5PIDQ6MCBHA5CNFSM4KIQCC32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJJYR4A#issuecomment-575899888, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGRMZB7YNGWXU6AHA6LNVTQ6MCBHANCNFSM4KIQCC3Q .

posted by busches about 5 years ago

Many of the repos I'm on do not have branch protection on, because we have a lot of repos and we don't want to go through every single one and enable branch protection. develop in this particular repo was not protected, and refined-github was deleting every time I merged into master.

It really has very little to do with protected branches and way more to do with the extension doing something unexpected and requiring another click after a merge to get something back. I did not know this was a feature, so refined-github was actually requiring another click to restore this branch.

posted by qbunt about 5 years ago

Many of the repos I'm on do not have branch protection on, because we have a lot of repos and we don't want to go through every single one and enable branch protection. develop in this particular repo was not protected, and refined-github was deleting every time I merged into master.

FYI, they did add an API to modify this so it can be automated for old repos and when creating new repos. This has made it super easy to protect a lot of repos, assuming you use standardized naming conventions between them.

It really has very little to do with protected branches and way more to do with the extension doing something unexpected and requiring another click after a merge to get something back. I did not know this was a feature, so refined-github was actually requiring another click to restore this branch.

I'd disagree as that's the point of protected branches, you're still open to someone accidentally doing it if it's not protected. Either way, you should be able to get restore the branch with a click. The main issue was that you said you could not restore the branch sometime, which does seem like a GH bug and if you can reproduce it, should be reported to them.

It looks like you have multiple options here:

1) Protect long lived branches you don't want deleted. 2) Click restore after it's deleted 3) Disable the feature 4) Remove the extension

I think option 1 is the correct course of action and it's what we did when we used long lived branches. We automated turning them on and then scripted the creation of newer feature branches, as we created them for a lot of repos each month.

Whatever you choose to do, thanks for taking the time to bring up the issue and I still think there needs to be further exploration into branches being deleted that cannot be restored, hopefully if it happens again you can report it to us or GH or both.

posted by busches about 5 years ago

Appreciate you taking the time to respond, I didn't know about the new API for automating this, thanks for the heads up.

I was able to restore without issue, it's more a UX decision of the extension that I question. I've run it for years without any kind of unexpected behavior, a feature was added at some point and I was surprised by it. For a browser extension to do something unexpected (esp. a deletion) is not great for building trust. I understand it's just a click, but so is deleting the branch.

posted by qbunt about 5 years ago

[..] a feature was added at some point and I was surprised by it.

To get some trust back, the extension will soon highlight newly added features in the options window.

posted by jerone about 5 years ago

Fund this Issue

$0.00
Funded

Pull requests