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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.