Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Simon Bromberg February 26, 2018

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?

2 answers

1 vote
Berkan May 26, 2018

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. 

 

Martin Gregory September 3, 2018

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.

Aishwarya Seeram June 28, 2019

Is this feature still available? I don't see the link option in the bitbucket settings. Will I see it only after integrating JIRA and bitbucket?

0 votes
Aishwarya Seeram June 28, 2019

Posted a question as answer

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events