Thank you for the new Default Task feature in Pull Requests. For our use case, it's a higher priority to have default tasks in release branches only, as a final sanity check before going into production. Is this on your roadmap?
Hello @Aaron Sterling ,
Thank you for reaching out to Atlassian Community.
The Default Tasks configured in Repository settings apply to all branches, regardless of the branch name. I'm afraid that it's currently not possible to define Default Tasks to a specific branch naming/pattern, so I went ahead and raised a feature request to implement this functionality:
I would suggest you to add your vote there, since this helps both developers and product managers to understand the interest. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all features are implemented with this policy in mind.
Thank you, @Aaron Sterling .
If you do not mind a separate app, you can achieve this with our Checklist Buddy for Bitbucket Cloud.
It uses configuration as code for the definition of the default task rules, which allows reviewing changes by peers, tracking changes over time and all the other benefits Git has over UI-based configurations.
To restrict default tasks for certain branches, you can use this syntax:
--target release/* +task+ Release notes ready?
Besides the configuration of the source/target branch, it is also able to create content-dependent default tasks, e.g.
--files /app/*.jsx +task+ UI changes visually inspected on IE/Edge
creates the default task only if the PR contains any React JSX files.
For more information, please check the app documentation.