I am using BitBucket server version 6.5.1.
I am doing a pull followed by a merge, however post the merge the source doesn't get deleted even though I set 'closed' to true in my pull request.
Pull API (POST) - /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests
Sample Body:
{"title":"test title","description":null,"state":"OPEN","open":true,"closed":true,"fromRef":{"id":"test_id","repository":{"name":null,"slug":"sample","project":{"key":"SAMPLE"},"state":null}},"toRef":{"id":"master","repository":{"name":null,"slug":"sample","project":{"key":"SAMPLE"},"state":null}}}
Sample Response:
{"id":123,"merge_status":null,"version":0}
I then use the Merge API - /REST/API/1.0/PROJECTS/{PROJECTKEY}/REPOS/{REPOSITORYSLUG}/PULL-REQUESTS/{PULLREQUESTID}/MERGE?VERSION’
The pull and merge functionality are working fine, however the source doesn't get deleted.
I am referring the rest APIs using link - https://docs.atlassian.com/bitbucket-server/rest/6.5.1/bitbucket-rest.html#personal-repositories
What am I missing?
Thanks
Hi!
I hope you need first remove PR, then branch.
Hi,
Thanks for the response.
I do not intend to delete the branch separately but to provide a functionality similar to ‘Delete source branch after merging’ – the check box that is seen in the UI, when a merge is done. I found a bug - 'https://jira.atlassian.com/browse/BSERV-10976' which seems to cover the issue.
Regards
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.