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

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

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed (View Workflow)
    • Resolution: Fixed
    • Fix Version/s: 4.5.1
    • Component/s: None
    • Labels:
      None
    • Feedback Policy:
      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

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

                Dates

                Created:
                Updated:
                Resolved: