Commit checker for Jira issues
While configuring your requirement, you can run validation on commits that look for Jira issue keys typed into the commit message. You can also choose to validate that the issues placed in commit messages also actually exist in Jira.
In order to validate Jira issues in commits that exist in Jira, Bitbucket Data Center must be linked to Jira. Learn how to link to Jira.
Users can authorize specific Jira sites from Profile picture > Manage account > Authorized applications.
Project links (optional)
You can prioritize checking issues in a specific Jira by linking your Bitbucket project to your Jira project using Project Links. This means that everything in the project will be prioritized for that Jira, reducing the time used for validation. Learn how to create project links across applications.
Your requirements can be set up at the project or repository level (requires admin permissions). Any repository can inherit its project settings.
To configure and customize the commit checker at the repository level (requires repository admin permissions):
Go to Repository settings > Jira issues (under Workflow)
From Project settings inheritance, select Use custom settings.
Select which Jira issues requirement to use:
Don’t need a Jira issue key - use this option to skip verifying Jira issues in commit messages for this repository.
Must contain a Jira issue key - use this option to set a requirement for verifying Jira issues exists in commit messages for this repository.
Must contain a Jira issue key that exists in Jira - use this to set a requirement for verifying Jira issues exist in commit messages for this repository and that they exist in your Jira site.
NOTE: Choosing this option may impact Git push performance due to each push requiring a query being made to Jira before the push can be accepted.
Set up any exemptions you’d like to use.
You can set exemptions that will not validate those commit messages that contain specified terms or certain users who push commits.
Terms - type in any terms here to have the check ignore the validation of Jira issues if a commit message uses any of these. NOTE: These terms are case sensitive.
Users - add any users (pushers) to have the check ignore the validation of Jira issues if a commit message is created by any user that has pushed a commit.
Exclude merge commits
Enabled by default, merge commits will be excluded from commit requirements. This includes merge commits pushed through the command line and merges made via the pull request UI (squash merges will always be checked).
To include merge commits in your requirement:
Select Jira issues (under Workflow) from a project or repository’s settings.
Clear the checkbox next to Skip validation of Jira issues on merge commits.
Was this helpful?Yes Provide feedback about this article