You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.
I noticed that whenever I create a PR via GH WebUI it defaults to creating it against main branch.
If you could tweak settings so that all PRs would default to the develop branch instead of main (without precluding the option to PR against main though) it would be much better, since once a PR is created it's not possible to change its target branch without deleting the PR and creating a new one from scratch. The idea is to prevent PRs accidentally targeting main when they were intended for develop, since it's easy to overlook this via the WebUI.
I'm not sure how you can do this without affecting the default branch — the default branch should be main, not develop. If there isn't a specific setting for the default pull-request branch, you might try to block PRs on main via the branch protection settings, as a last resort (although I think that creating a PR against main should be kept an open option, although not the default).
The text was updated successfully, but these errors were encountered:
tweak settings so that all PRs would default to the develop branch instead of main (without precluding the option to PR against main though)
It seams that this is not (yet?) supported in GitHub. I couldn't find an option in the settings, and other people seem to have the same request, but no solution, as can be seen here and here.
you might try to block PRs on main via the branch protection settings.
Yes, that's supported. There is a checkbox labeled "Lock branch. Branch is read-only. Users cannot push to the branch."
But then nobody can make a PR to branch main, unless the checkbox is temporarily unchecked.
Yes, that's supported. There is a checkbox labeled "Lock branch. Branch is read-only. Users cannot push to the branch."
But then nobody can make a PR to branch main, unless the checkbox is temporarily unchecked.
Turning main into read-only seems a bit extreme, it might also prevent other operations.
Do you want me to do that?
Probably not, since there isn't a proper option to do so. The only goal was to prevent PR ending up targeting the main branch by default, since IMO I've seen that it often leads to PRs that need to be recreated. But lacking a proper option to handle this, I suggest avoiding fiddling with settings which we might later regret.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I noticed that whenever I create a PR via GH WebUI it defaults to creating it against
main
branch.If you could tweak settings so that all PRs would default to the
develop
branch instead ofmain
(without precluding the option to PR againstmain
though) it would be much better, since once a PR is created it's not possible to change its target branch without deleting the PR and creating a new one from scratch. The idea is to prevent PRs accidentally targetingmain
when they were intended fordevelop
, since it's easy to overlook this via the WebUI.I'm not sure how you can do this without affecting the default branch — the default branch should be
main
, notdevelop
. If there isn't a specific setting for the default pull-request branch, you might try to block PRs onmain
via the branch protection settings, as a last resort (although I think that creating a PR againstmain
should be kept an open option, although not the default).The text was updated successfully, but these errors were encountered: