Details
-
Suggestion
-
Resolution: Duplicate
Description
Problem Definition
No pipelines variable is presenting who performed the current build.
Suggested Solution
Add something like BITBUCKET_BUILD_ACTOR to default variables of custom pipelines.
Workaround
You can retrieve pipeline's actor information as "creator" attribute via REST API like as below:
REPOS="__USERNAME__/__SLUG__" curl -L --request GET \ --header "Accept: application/json" \ --url "https://api.bitbucket.org/2.0/repositories/${REPOS}/pipelines/?pagelen=100"
It's a bit messy but probably you can determine the current pipeline with BITBUCKET_BUILD_NUMBER variable.