Rulesets configuration for Automatic Delete #152926
Replies: 5 comments 1 reply
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
I have the same rulesets settings and a "qa" branch was automatically deleted - I did not expect this behavior. After investigating I understood what had happened, but I don't like it. It seems like if |
Beta Was this translation helpful? Give feedback.
-
|
Here’s a possible solution for your rulesets issue: for dev Ruleset: try accessing the Settings > Rules > Rulesets, create a ruleset dev-protection targeting refs/heads/dev. then for main Ruleset repeat the same process Prevent dev Deletion using this: "name: Protect dev Branch from Deletion Lastly For the qa Deletion Issue protect qa with a ruleset like dev. If it’s a head branch, manually delete it after merging or disable the auto-delete setting. |
Beta Was this translation helpful? Give feedback.
-
|
Same issue here Bypasses must be enabled to allow backmerge with merge commit when using queue+squash (see https://github.com/orgs/community/discussions/68723). So the only way right now is to clean up branches manually. |
Beta Was this translation helpful? Give feedback.
-
|
Hey, just wanted to share something I noticed today. I was testing branch deletion behavior and it seems like this issue has been fixed — a branch covered only by a ruleset with "Restrict deletions" enabled can no longer be deleted manually, which previously was possible. That said, I couldn't find any changelog entry from GitHub mentioning this fix was shipped. As a workaround, I used to add the branch to Classic Branch Protection Rules in addition to the ruleset just to prevent accidental deletion. It seems like that's no longer necessary, and rulesets |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Product Feedback
Body
Hello!
I'm having a problem with the ruleset. I have a repository which commonly has two protected branches:
mainanddev.mainis used to merge fromdev, i.e.main <- devon each release, whiledevis used for development.When I was configuring the ruleset for
dev, I wanted it to satisfy:dev, it needs to do a CI check, and it can useauto-mergeto automatically complete the merge when the CI passes.auto-mergeto automatically delete one-off branches that finish merging if possible, so I've turned on theAutomatically delete head branches Loadingconfiguration.dev.When I was configuring the ruleset for
main, I wanted it to satisfy:devrelease version is successful (via CI check), it can beauto-mergeintomain, but don't deletedev.When I want to satisfy the
devruleset, I need to configure the CI check and bypass list, but when I'm in the bypass list, the ruleset formaindoesn't satisfy theauto-mergebut can't deletedevcondition, because bypass allowsdevto be deleted by me.So I'd like ruleset to be able to configure auto-delete related behaviours, or make the bypass rules a bit more detailed.
Or is there any way to fulfil the above conditions? I know that
Branch protection rulesseems to support these conditions, butRulesetsdoes not.Rulesets seem to be seen as an alternative to
Branch protection rules, but I can't replace the original configuration with Rulesets because of this problem.Beta Was this translation helpful? Give feedback.
All reactions