You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's good to hear, you are very welcome!
Please feel free to reach out if you ever need anything else!
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.