The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Accept a pull request within Bitbucket Pipelines

Philippe Cuvillier
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 29, 2019

Dear community,

Pipelines offers the possibility to deploy when a pull-request is open.

But is it possible to script Pipelines so that it automatically accepts and merges the pull request if the deployment went fine?

Thank you very much for any suggestions, insights or workaround.

Philippe

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 31, 2019

Hello Philippe,

Pipelines has no built in ability to automatically approve and merge a pull request.

You can however use the Bitbucket REST API and call the relevant endpoints inside of your running Pipelines scripts to accept and merge pull requests.

The relevant endpoints are documented here: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/pullrequests/%7Bpull_request_id%7D

Thanks,

Phil

TAGS
AUG Leaders

Atlassian Community Events