I have a pipeline that runs a script when pull requests are merged to the master branch. I want to obtain the title of that PR so I can use it to rename the generated artifact at the end of the deployment script. I know I can use the BITBUCKET_PR_ID variable to obtain the PR's ID, but I can only use this variable on pull request pipelines, and not the branch pipeline I'm using.
Any suggestions?