Pipeline to create a request and merge the request?

Karthikeya G May 26, 2023

I need to update my staging everyday 2-3 times a day. Currently I am raising a PR and merging it manually, Can I automate this process with bitbucket pipelines?

1 answer

0 votes
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2023

It should be doable, yes!

The Bitbucket Cloud REST API supports both operations you need:

  1. Creating a pull request: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-post
  2. Merging a pull request: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-pull-request-id-merge-post

And you can call these end-point from a pipeline!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events