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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.