REST API: Provide option to allow deletion of source branch after merging a PR

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: None
    • None
    • 6
    • 5

      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).

            Assignee:
            Unassigned
            Reporter:
            Dave Chevell
            Votes:
            15 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: