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,462,938
Community Members
 
Community Events
176
Community Groups

is there an environment variable for getting the name of the person who committed?

Edited
Deleted user Feb 03, 2022

Hi, I am sending a slack notification from my pipeline. Following is my notification description. I use default environment variables in there to get information.

Pipeline no: #$BITBUCKET_BUILD_NUMBER, branch: $BITBUCKET_BRANCH, commit - $BITBUCKET_COMMIT

 I need to get the username of the person who did the commit also. is there an environment variable for that? Or any other way to get that?

 

1 answer

1 accepted

0 votes
Answer accepted

Hi @[deleted] and welcome to the community!

Bitbucket usernames are not exposed via variables, API, or in the UI, to comply with GDPR regulations.

There is no environment variable to get the name of the commit's author, but you can use a git command to get that information.

The following command will give you the name of the commit's author:

git show -s --format="%aN" $BITBUCKET_COMMIT

You can store the value in a variable during your build as follows:

Author=$(git show -s --format="%aN" $BITBUCKET_COMMIT)

Kind regards,
Theodora

Deleted user Feb 06, 2022

This really helped. Thank you so much!!!

That's good to hear, you are very welcome!

Please feel free to reach out if you ever need anything else!

Kind regards,
Theodora

Like Deleted user likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events