"Require issue keys in commit messages" what about if the branch is not linked to an issue? Edited

For this feature https://blog.bitbucket.org/2017/05/16/document-changes-required-issue-keys-bitbucket-cloud/ where you can "Require issue keys in commit messages":


What if you have a branch that isn't for a specific issue on JIRA? You have to make a ticket for every change if you have that switch enabled?  E.g. what if you need to make a quick fix to your develop or master branch? Or if you're working on some side branch not associated with a ticket on JIRA?

1 answer

I think there is a misunderstanding here.  

As long as you setup your links under repository settings to hook with JIRA, you do NOT HAVE TO switch on "Require issue keys in commit messages" under Bitbucket Repository -> Settings -> Links . That is basically a rule you are setting that no one can push anything without issue keys. If you want to disable temporarily, then you can switch it off and on any time.  

Again, if you keep it off all the time, it is being optional, so if there is no jira ticket for it, people can still push it  and if there is an issue key, then JIRA and BitBucket are still connected in case any issue key is given in commit. 


I think the point is that you generally want to enforce that the commit message references the branch.  That's why you would use the "require issue keys in commit messages" in the first place.

I believe that the answer to the OP's question is "you're supposed to have a ticket for every piece of work you do - why wouldn't you have one?"

However even this is not the whole picture.  What about merge commits?  These don't have a ticket number.   I don't understand how that "require issue keys in commit messages" feature is supposed to work for merge commits.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

271 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you