Hi all,
Bitbucket Pipelines question here:
I'm trying to get the commit hash of the head of the destination branch of a PR. I can see the current commit is available in $BITBUCKET_COMMIT and the destination branch name is in $BITBUCKET_PR_DESTINATION_BRANCH, but how can I get the head commit of the destination branch?
I need this to fully take advantage of Happo for UI screenshot testing.
Thanks in advance.
Hi Adam,
You can use in your bitbucket-pipelines.yml file the following command, in order to get the hash of the last commit in the destination branch:
git rev-parse origin/$BITBUCKET_PR_DESTINATION_BRANCH
Please feel free to let us know if this works for you and if you need anything further!
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome, glad to have helped!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.