Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to merge a feature branch into master without PR

mohan yadav
Contributor
May 22, 2024

How to merge a feature branch into master without PR, please let me know the rest api endpoint to merge feature branch into master like below

Capture.PNG

 

bitbucket should have rest API end point like this https://docs.github.com/en/rest/branches/branches?apiVersion=2022-11-28#merge-a-branch

2 answers

1 vote
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 23, 2024

G'day, @mohan yadav 

Could you please provide further context on why you need to merge a branch without going through a pull request?

We currently don't have an existing API to merge a branch directly without a PR, so I am interested to hear your use case for this. However, we do have an existing feature request for merging branches via API at the following link: 

https://jira.atlassian.com/browse/BCLOUD-12583

Regards,
Syahrul

 

mohan yadav
Contributor
May 23, 2024

Hi @Syahrul the context is below:

We have a system in c#, in which
1. If there is PR available  then check PR approval, conflicts etc ... action and then merge the PR - This is done as rest api end point exist.
2. If PR is not available  then merge the feature directly into master without PR checks because we can have some setting on PR like approver restriction ,must reviewer exist etc.. 

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 27, 2024

Hi Mohan,

Thank you for the feedback.

Please make sure you add your vote (by selecting the Vote for this issue link) to the feature request that Syahrul shared to express your interest. You can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.

Implementation of features is done as per our policy here and any updates will be posted in the feature request.

If you have branch restrictions, I'm afraid it is not possible to achieve what you want via API at the moment. However, you could merge from the UI (from the Branches page of the repo) without a PR.

Kind regards,
Theodora

1 vote
mohan yadav
Contributor
May 23, 2024

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events