Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: exclude COMMENTED PRs from affecting label status
There's a flaw in this GitHub action where it removes the +2 or +1 labels from pull requests that have an APPROVED status. This happens because comments are counted as PR reviews, and the action only considers the most recent review by each reviewer. This means if a reviewer approves a pull request but later comments on it, their latest "review" is now just a comment, and the approval is ignored. Review states for pull requests include: • APPROVED: The pull request can merge. • CHANGES_REQUESTED: Prevents merging. • COMMENTED: Just informational. • DISMISSED: Negates an earlier review. • PENDING: Review is incomplete. To address this, we should ignore reviews that are solely comments. Our focus is on the most recent review. A pull request should only lose its +1 or +2 status if a subsequent review either requests changes, dismisses the earlier approval, or is still pending. Comments alone should not strip away an APPROVED status.
- Loading branch information