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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,236
Community Members
 
Community Events
176
Community Groups

Can bitbucket pull request link be added to commit message when merged?

I would like to add the pull request code review link at the bottom of every commit message.  Can this be done?

Scriptrunner runs at the time of merging so it seems like I use that.

1 answer

1 accepted

0 votes
Answer accepted

Hi @Michelle Geppert ,

Thank you for your question.

I am the Product Manager for ScriptRunner for Bitbucket.

I believe something like that could be achieved using a Custom Listener (https://docs.adaptavist.com/sr4bib/latest/features/listeners/custom-listeners) to listen to Pull Request merge events and then automatically amending the affected Git commits.

However, I'd like to understand further as to why you want to do this, to see if we can help you to achieve what you want to achieve in a better way?

Kind regards,

Robert Giddings,

Product Manager, ScriptRunner for Bitbucket

Thanks I'll checkout customer listeners.

We'd like to be able to go from 'git log' to a code review (pull request) easily.  We'd like to do this for 2 reasons

1. to see what's in the commit

2. to see what discussions there were around the commit

Mainly the first one.

Our team is moving from git with Gerrit and we had the review link automatically added to all commit messages.

A neighboring team is moving from code collaborator and perforce and they manually added the link to the commit messages.

Listerners would probably do the job but there's no example code for how to run a git command from a listerner or how to do it another way.  I'm too new at this not to need example code.

I did find that it's fairly easy to go from a commit hash to the commit link which has the pull request link.  So we can going to use that method.

Hi @Michelle Geppert ,

Sorry for the late reply!

Do you still require a code example, to help you?

As your last comment seems to suggest that you may have found the solution to your problem?

Please let me know if you require any additional help?

Kind regards,

Robert Giddings,

Product Manager, ScriptRunner for Bitbucket

I decided to go a different way.  thank you for your help

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events