Skip to content

Update branch protection rules#444

Open
lukasbischof wants to merge 1 commit intomainfrom
feature/update-branch-rules
Open

Update branch protection rules#444
lukasbischof wants to merge 1 commit intomainfrom
feature/update-branch-rules

Conversation

@lukasbischof
Copy link
Copy Markdown
Member

@lukasbischof lukasbischof commented Apr 27, 2026

The branch protection rules were updated in #437 (without any apparent discussion, which I find odd given the impact and high problematics of the change). The change applies the exact same restrictive rules to all branches, no matter their role in the development process.

This yields the following issues:

  • Depfu cannot update dependencies anymore as Depfu receives a 422 - Reference does not exist error when trying to push its stuff.
  • You're not allowed to force push onto your feature branches, which is a common practice to keep the history clean and avoid accidental pushs of e.g., "fixup!", "wip", etc. commits.
  • You need a linear history in your working feature branches, so you're not allowed to merge anything. This just unnecessarily complicates the process and does not bring any value since we will squash the feature branch anyway into a single commit so why bother with a linear history in the feature branch?
  • If your feature branch depends on another feature branch (which happens a lot in practice), you're not allowed to rebase and force push anymore, you'd have to merge in the other feature branch (which is not even allowed either), so basically you're stuck.
  • You cannot revert pull requests anymore

One project recently was setup according to the ASG including this change and we quickly ran into issues so I had to exclude the feature branches from the protection rules. The suggested changes in this PR now reflect what we have there. One possible alternative setup which might work would be:

Three protection rules:

  • main, as it is right now
  • develop and long living branches (i.e., anything that does not match */**, so like redesign, develop2, etc.), with the same rules as the current non-main rule
  • Feature branches, matching */**, with the only rule that CI has to pass before merging, so that you don't merge failing code into another feature branch.
    • Even though this reflects the original intent of the change in Add hint regarding redesign #437, I don't think that this is even a good idea. Why shouldn't I be allowed to split my feature into multiple separate branches that logically make sense and are easier to review but only the last PR in the stack is actually passing? I think, this is within the responsibility of the developer to make sure that his work is tidy and logical so I wouldn't restrict this when it's still a WIP.

@lukasbischof lukasbischof self-assigned this Apr 27, 2026
@lukasbischof lukasbischof marked this pull request as ready for review April 27, 2026 07:52
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

Successfully merging this pull request may close these issues.

1 participant