Hello: I noticed there were couple of threads about "creating" a pull-request from the command line on my client side (without logging into bitbucket repo via a browser).
I have a follow-on question. Is there a way to "merge" and optionally delete the pull request (which one can do from the browser) but from the remote client via the command line? Thanks,
Hi @ramnadtester ,
Yes it possible through API.
https://docs.atlassian.com/bitbucket-server/rest/6.9.1/bitbucket-rest.html#idp289
For example:
curl -H "Content-Type:application/json" -H "Accept:application/json" --user admin:admin -X POST http://<Your_Stash_URL>//rest/api/1.0/projects/<PROJECT_ID>/repos/<REPO_ID>/pull-requests/<PR_ID>/merge?version=0
Thank you .. will give it a try!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.