Missed Team ’24? Catch up on announcements here.

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

Custom commit message in workflow link

Wanderley Teixeira October 28, 2019

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...

1 answer

0 votes
Joao Sgreccia
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 29, 2019

Hi @Wanderley Teixeira

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events