Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling Update branch button #98

Closed
luisfmsouza opened this issue Oct 15, 2018 · 10 comments
Closed

Disabling Update branch button #98

luisfmsouza opened this issue Oct 15, 2018 · 10 comments

Comments

@luisfmsouza
Copy link
Collaborator

Think we can disable this update branch button (image below) from PR on this repo settings. This button is just adding some noisy to all opened pull requests, because it enforces the branches to be up-to-date with master all the time, and we had to be requesting rebasing/squashes.

Button:
image

Example of the noisy:
image

Even when we disable the button, Github will guarantee to use integrity of the code. And also, it will tell us when there's a conflict between branches, the we can act directly on it before merge. Otherwise, there's no need to be up-to-date with master all the time.

@lnfnunes
Copy link
Owner

lnfnunes commented Oct 16, 2018

@luisfmsouza I have a different opinion about this point. I like to enforce branches to be up-to-date with master always, so the "Update branch" button is just a try, exactly, to prevent asking people to do rebasing themselves.

Even though your print is showing a noisy, the master timeline is kept untouched and clean
image

How to garantee the PR is up-to-date with master and we are not loosing anything? I'm not sure if only in conflicted state this could happen...

Anyway, I'll change the settings and we can give it a try ✌️

@luisfmsouza
Copy link
Collaborator Author

Let's try it.

@rsp
Copy link

rsp commented Mar 4, 2019

Sorry for an off-topic question but how have you managed to disable the 'Update branch' button? I was sure that it is impossible to disable it (see those comments).

@lnfnunes
Copy link
Owner

lnfnunes commented Mar 4, 2019

@rsp we don't "disable" the button as you may be thinking, we just remove the check forcing branches to be up-to-date with master. Personally, I prefer to keep this ON, but as @luisfmsouza said, it adds some misunderstanding on novice people and difficult contributions with some kind of invisible contribute wall rule!

Settings 👇
image

So far, so good! We had no problems without this option 🙂

@Bubesz
Copy link

Bubesz commented Jul 5, 2021

@rsp we don't "disable" the button as you may be thinking, we just remove the check forcing branches to be up-to-date with master. Personally, I prefer to keep this ON, but as @luisfmsouza said, it adds some misunderstanding on novice people and difficult contributions with some kind of invisible contribute wall rule!

Settings 👇
image

So far, so good! We had no problems without this option 🙂

This was extremely valuable information for me! I'm glad you shared it! 👍

I added the "Require status checks to pass before merging" rule with the aforementioned "Require branches to be up to date before merging" rule at the beginning of a testing period. Because of the low intensity of coding (to main branch), we did not come across the "Update Branch" button for days and on one hand, I forgot I added such a rule, and more importantly,

I expected this button to rebase the PR HEAD branch onto the base branch but instead, it creates a merge commit. We use rebase everywhere, so we'd like to avoid merges. This way, we had to manually rebase our branches which was a headache. Currently, the update strategy of the Update Branch button cannot be configured. Actually, there is an issue related to this: isaacs/github#1419

@SpootyMcSpoot
Copy link

Any update here? I'd like to see the option of enforcing this without the button present. Devs can rebase on their local and push rather than use the button.

@bgrosse-midokura
Copy link

bgrosse-midokura commented Aug 5, 2021

image

I can't find this checkbox in Settings?

Edit: found it under Settings->Branches->Branch protection rules->Edit button

@lnfnunes
Copy link
Owner

lnfnunes commented Aug 6, 2021

Enabled it!

Screen Shot 2021-08-05 at 22 22 23

@motakbiri2
Copy link

https://github.com/motakbiri/UpdateBranchRemover/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants