You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hey,
I need to prevent merging to a specific branch any pull requests that include a change to a specific Python variable.
Is it possible to do this? Maybe just for a specific line or a specific file? Or maybe instead of preventing the merge, add an alert?
Thanks!
It may be a bit heavyweight for your use case, but you could:
That way, developers won't be able to create a commit to that file, so this approach catches the problem early on.
(Disclaimer: this solution requires a paid Jira app that I'm working on.)
The best option to stop a PR merge under a certain condition would be to create a configurable merge-check. The merge-check would scan the change set in the source branch and detect any condition you configure.
Unfortunately this is not possible with bitbucket cloud branch permissions - however there is an existing feature request https://jira.atlassian.com/browse/BCLOUD-19885 that would allow you to create such a merge-check. Please vote and add yourself as a watcher.
Best, Ulrich
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.