Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-10976

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

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • None
    • None
    • None
    • 3
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            dchevell Dave Chevell
            Votes:
            13 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated: