I am looking to get the userid of the user, who triggered a particular pipeline. Any env var or any api call shall be helpful. During my investigation, I was able to extract bitbucket uuid of the user who triggered the run.
Thank you for reaching out to the community.
Unfortunately, there's no option or available default env var to get the userid of the user who triggered a Pipelines build, what you can do, however, is to get the last commit's HEAD author where the Pipelines is triggered to get the user's info like committer's author's email.
Alternatively, you can also use BB REST API endpoint to get the "creator" of the Pipeline. Here's the endpoint documentation: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-pipeline-uuid-get
Regards,
Mark C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.