Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×We've built a custom merge check that needs to know who the user that is clicking the 'merge' button on the PR is. There is no principal object in the context, and nothing that we can see in the event or context provides any clear guidance on who is attempting to merge the PR. Any guidance would be appreciated!
Dan
fun - following up on my follow up--- finally got a call via the requestBitbucket thing - the accountId is the id of the app itself - NOT the person attempting to merge the PR...
any pointers?
When I first started using BB Pipelines, this is the very first thing I noticed and there is nothing directly available in the API that will give you this information. It's a horrible missing feature.
What I ended up doing was collecting the info into an artifact in the PR build and saving that artifact in S3 using a naming convention that included the PR number.
Then in the build that runs on the destination branch, look at the first commit message on the destination branch. It will included the PR number in the merge commit and you can use that to determine which artifact to pull down.
Hope this helps.
unfortunately - I think there's no way to get it - what we're going to have to do is change our business logic from the person merging the PR to instead looking at the approvers and rework our business needs around that. (do this if "x" person merged -> do this if "x" person approved it on merge) - bleh.