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

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


1 badge earned


Participate in fun challenges

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


Gift kudos to your peers

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


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!


how to get Jira ticket number when export commit log

I have been tasked with pulling the full commit history for all repositories. The resulting file will be audited by an external and internal auditors. They are requesting the commit log should have repository name, commit date, commit message, branches information, and Jira ticket number so that they can categorized and track the log via Jira tickets.
The way I did now is running the git log below:
git log --branches --tags --remotes --full-history --date-order --format='%ai %an <%ae> %h %f %d' --output commits.csv
which includes most of the information I need except Jira ticket. Is there anyway to get the Jira ticket number?
By the way, I tried to create an API but the token is not working

Thanks in advance for your help!

1 answer

0 votes
Erez Maadani
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.
Dec 01, 2022

Hey @Scarlett Zhao 

git commits are not aware of Jira, or any other ticketing system. From my personal experience, there are branch name conventions and sometime commit message conventions which contain the Jira ticket. This way, BB knows how to connect the PR to relevant Jira ticket.

If you are using some convention which includes the jira ticket, you could parse it out. 

If you are not using a convention or have commits which don't align with a convention, you might need to do some backward fixing (re-writing the message to include the Jira id).

Recently I've learned that Bitbucket has a feature of commit comment (not the commit message). You might be able to use it for backward fixing without re-writing git history.   

Hope that helps.

Hi Erez,

Thank you so much for your reply. Yes I think you are right. If the developer adds Jira ticket number when they commits, Bitbucket will automatically link the commits to Jira ticket, which can be parse it out

Would it be possible if you could give me some advice on how to re-write the git history or how to use commit comment? 

Much appreciated for your help! Thanks!

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events