I see the option to delete individual pull requests in Bitbucket server, but need a way to delete unmerged PRs in bulk that are of a certain age.
Yes. Use HTTP DELETE. More info here:
https://docs.atlassian.com/bitbucket-server/rest/5.1.0/bitbucket-rest.html
Requires at least Bitbucket Server 5.1.0.
Alternatively, if you're willing to toast all the source-branches (via "git push --delete") that correspond to your stale PR's, that will automatically close the PR's, and is easy (though somewhat dangerous) to do in bulk. More info here:
ahhhh. only on 5.1.0 then. Good to know when we upgrade. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately the only way to figure out what versions of the REST API support various features is via binary-search (by altering the Bitbucket version directly in the URL)!
e.g., I tried 5.0.2:
NOPE - https://docs.atlassian.com/bitbucket-server/rest/5.0.2/bitbucket-rest.html
Then 6.0.0:
YUP - https://docs.atlassian.com/bitbucket-server/rest/6.0.0/bitbucket-rest.html
And so on until I found the feature appeared in Bitbucket 5.1.0.
p.s. You might like our PR-Booster add-on! It works all the way back to Bitbucket 4.x and provides a pretty substantial bump in functionality (e.g., rebase, squash, amend, and cherry-pick buttons, among other things). Bitbucket's built-in rebase functionality doesn't appear until Bitbucket 5.5.x.
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.