Changing the destination branch of a pull request fails to trigger unapprovals

Issue #8 resolved
Former user created an issue

It appears the approval trigger only exists on new commits to the source branch of the pull request, but when someone edits the pull request and changes the destination branch of the pull request approvals are not reset.

Use Case: Developer submits a pull request into a future release then proceeds to get all the required approvals on the pull request... before merging the developer edits the pull request to go into the current release branch then immediately merges it into a branch that there were no approvals for.

Comments (3)

  1. Former user Account Deleted reporter

    I'm not sure why, but despite this feeling like a bug, it appears like was intentional. The code in the rescopeEventListener has this line {code} // only withdraw approval if the pull request's source branch has changed, not it's target. if (!event.getPreviousFromHash().equals(pullRequest.getFromRef().getLatestChangeset()) {code} Removing the comment and the conditional check will fix this problem.

  2. Log in to comment