Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
None
-
3
-
Description
Problem Definition
When merging a pull request in the web UI, there's an option to "Delete source branch after merging". This calls a second, undocumented resource to handle the deletion of the source ref and the retargeting of any dependent PR's that had been targeting the source ref.
When merging a PR via the {repositorySlug}/pull-requests/{pullRequestId}/merge resource, there is no equivalent option to delete the source ref. The pull-request-cleanup resource that can do this is undocumented, and therefore isn't safe for clients to use.
Suggested Solution
Provide a deleteSourceRef option in {repositorySlug}/pull-requests/{pullRequestId}
/merge
Workaround
Use the internal resource to clean up PR's after merging (not recommended).