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

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events