I would like to know how to get the Pull Request title as a Variable in Pipeline.
The below document gives a list of default variables, but can't find what I am looking for.
You can get the title of a pull-request via the API.
The BITBUCKET_PR_ID is available as environment variable if the pipeline is a pull-request pipeline.
@tony.thomas Yes, as written, you can get the PR title as output from the API. The output can be assigned to a variable (e.g. with utilities like jq or similar).
This requires using the API successfully first. Please check the existing Q&A and support resources for that incl. trouble-shooting. Some more references:
If it still does not work for you, please provide the example.
Example with the curl and the jq utilities (working API authentication with necessary access rights required):
curl ... -fsS -H 'Content-Type: application/json' \
| jq -r '.title')" \
; test "$BITBUCKET_PR_TITLE"
Hello friends! From the community that brought you Welcome Wednesday, Throwback Thursday and Friday Fun, welcome to Taco Tuesday, a weekly discussion about all things Trello. The best part? One Tac...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events