I am exploring Atlassian tools for my company, as a possible option to our own current SCM/issue management tool set. One of the features our current integration contains, which we don't want to sacrifice, is the ability for the SCM tool to require that the commit is connected with at least one open issue ID in the issue management tool.
I know that BitBucket cloud integrates with JIRA cloud, such that a JIRA issue will quickly identify branches and pull requests connected with a given JIRA issue by searching for the ones whose names start with that issue ID.
But how do you take this one step further and prevent the ability to merge a pull request whose name does not start with a valid JIRA issue ID, or (better), whose associated JIRA issue is not in a particular state?
Any help/insight is appreciated.
(Yes, I know you can restrict /who/ can merge pull requests, so that you could just train them all to not merge PR's without open JIRA issues. That's not what we want; there's got to be a way to make it work the way I describe.)
Hi, @Dan Engel! Welcome to the community!
Currently, we do have an option to enforce the use of Jira Issue Keys on commit messages. In order to enable this feature, you can follow the next steps:
Open the repository you would like to change
Go to Repository Settings > Links
Enable the "Require issue keys in commit messages" option
Once enabled, Bitbucket will only accept pushes to your repo if the pushed commit message contains an issue key.
For now, it is not possible to enforce the usage of Issue Keys strictly on Pull Requests, this is only used in commit messages. However, we already have a Feature Request to make it possible to enforce this behavior on Pull Requests:
I would suggest that you add your vote there (by selecting the Vote for this issue link) as the number of votes helps the development team and product managers better understand the demand for new features.
You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.
Implementation of new features is done as per our policy here and any updates will be posted in the feature request.
I hope this helps, but do let me know if you have any questions.
Kind regards,
Caroline
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.