PR resets approvals when there are no changes in the diff, despite “Keep approvals if there is no change to the diff in the pull request” being enabled

XMLWordPrintable

    • Severity 2 - Major

      Issue Summary

      Pull requests are losing their approvals after a rebase/merge commit, even when the “Keep approvals if there is no change to the diff in the pull request” option is enabled in branch restrictions. This occurs even though the diff remains unchanged after the rebase/merge commit.

      Steps to Reproduce

      1. Enable branch restriction: Ensure “Keep approvals if there is no change to the diff in the pull request” is checked.
      1. Create a feature branch and open a pull request:
      1. Approve the PR.
      1. Rebase/merge the feature branch onto main (no changes to the diff).
      1. Push the rebased branch.
      1. Observe that the PR approvals are reset, even though the diff is unchanged.

      Expected Results

      Approvals should be retained if there are no changes to the diff, as per the branch restriction setting.

      Actual Results

      Approvals are reset even though the diff is unchanged. This disrupts review workflows and causes unnecessary re-approvals, even when the code under review has not changed.

      Workaround

      The approvers needs to reapprove the PR even though no diff changes. 

              Assignee:
              Anas Siraj
              Reporter:
              Karthick S
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: