I would like to enforce the use of a standard git commit message as follows:
TEST-123: This is a proper commit message
Anyone can help create a custom link in Bitbucket Cloud to accomplish this. I noticed that Bitbucket cloud has a read-only rule (((?P<linker_value>[\w\-]+)\-\d+)) and that only enforces that a JIRA ticket is in the message. Also, I am unable to read the To part of it https://<somecompany>.atlassian.net/rest/bitbucket/1.0/is...
If you only want to enforce the following pattern
TEST-123: This is a proper commit message
It is possible to configure a git hook that offers a variety of possibilities.
However, if you want to use the linking feature to create a link to your web app you need to follow these steps:
https://confluence.atlassian.com/bitbucket/link-to-a-web-service-283641959.html
1) Create a link key to match your commit message, such as
((((^\w{4})-)\d{1,3}):) which will capture TEST-123:
2) On the link url, it will be necessary to assemble the URL for your service including the matching group, such as
http://mywebsite/issue/\2
In this scenario, the link for the commit will be
http://mywebsite/issue/TEST-123
If I can provide any further assistance, do not hesitate to ask
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.