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

Mark pull request as declined instead of merged when force push reduces mergeable commits to zero

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • 4.5.1
    • None
    • None
    • 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

      Repo:

      1. Create a repo and add some revision history to it
      2. Fork repo
      3. Make changes to master branch on fork
      4. Issue pull request from fork to upstream
      5. In a local clone of fork reset --hard the head back to match upstream
      6. Force push the local clone to the fork

      At this point the fork and its upstream have identical heads and Stash marks the pull request as merged. This isn't correct, all changes for the pull request were reverted out of the fork and thus nothing was merged. Declined would be more appropriate.

      Worse the pull request description still lists the commits and differences from the revoked commit objects.

      This would make sense if the pull request was static at the point it was created but the general pull request process has been written to automatically add new commits to the source branch as such it should correctly handle commits being removed from the source branch and if the pull request ever ends up empty it should either decline, delete or just leave it open and empty. Marking as merged seems like the only option that's actually wrong.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              andrew.milne1 andrew.milne1
              Votes:
              6 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: