Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

BitBucket JIRA Cloud Integration

Avneesh Jain
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 9, 2018

I have enabled BitBucket and JIRA Cloud integration and I am seeing that commits are denied if the issue key is not present in the commit message.

I want to deny the commit, even if the issue key is present in the message, under following scenarios:

a) The issue is not in open status

b) The issue is not assigned to the committer.

So a commit is allowed  only if the JIRA key referenced in the commit  is assigned to the user doing the commit and is in open status.

Is this possible in JIRA Cloud? How can I do it?

Thanks

Avneesh

1 answer

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 9, 2018

The validation is done in the Bibucket side. You might have one that prevents the commit if the message doesn't have a valid issue key. You can add more conditions only if the hook allows it.

You can also create your own commit hooks by writing an add-on. Read more about hooks at https://confluence.atlassian.com/bitbucketserver/using-repository-hooks-776639836.html

Avneesh Jain
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 9, 2018

Hi Jobin,

I am not using BitBucket Server, I use BitBucket cloud. I dont think repository hooks are supported in BitBucket Cloud, it only support webhooks which are executed after a commit is done, webhooks cannot prevent commits.

-Avneesh

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 10, 2018

Ah, cloud! Still, it is done on the Bitbucket side. Not using hooks but using the Links option under Settings.

See https://blog.bitbucket.org/2017/05/16/document-changes-required-issue-keys-bitbucket-cloud/ for more details.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events