Comments (2)
Bitbucket Server doesn't provide an option for this in its merge endpoint:
/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/merge
If you look at Bitbucket Server's own access logs to see what rest endpoints are called internally when you merge a PR with "Delete source branch after merging" ticked, you'll see that a second endpoint receives a POST
:
rest/pull-request-cleanup/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}
JSON payload:
{deleteSourceRef: true, retargetDependents: true}
This pull-request-cleanup
resource is undocumented and is therefore considered an internal implementation detail. In other words, it can't be relied upon to be supported in future and may be subject to undocumented changes at any time. That being the case it seems unwise for this library to provide support for an undocumented, internal API.
As it happens I work for Atlassian support, and this seems like a reasonable request so I've raised BSERV-10976 to request adding a supported way to do this via the API. If that gets implemented then the equivalent option can be added to this library.
Until then, I'd suggest marking this one as Blocked (or Closed) until the above issue gets some movement.
from stashy.
Closing until BitBucket Server adds a way to do this
from stashy.
Related Issues (20)
- Add Get and Put Functionality for "Allow Forks" Setting
- Not able to list project, Project repo's and admins
- How to get the repo list in bitbucket which has default branch as develop?
- Checking All the Merged Pull Requests. HOT 3
- Documentation on creating a pull request HOT 3
- New version release on pip HOT 3
- Infinite Loop when request changes for Pull Request with more than "page.max.changes"
- How to Extract All commits from and dev or master branch with in repository HOT 2
- bitBucket.projects[project['key']].repos[repo.get('slug')].commits('2020-03-03','2020-02-02') not working HOT 1
- API core URL incorrectly determined
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- using https to connect does not work HOT 1
- Add support for username update
- New pypi release? HOT 6
- Support for python 3.8 / 3.9? HOT 1
- Getting GenericException: Unknown error: 501
- Add "merges" option
- Can't connect to BitBucket server
- How to get the details like email id and full name of the authenticated user
- stashy isnt updated in pypi since 2021
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stashy.