Add independent peer review validation workflow#64
Open
AndrewGable wants to merge 17 commits into
Open
Conversation
grgia
reviewed
May 14, 2026
grgia
reviewed
May 18, 2026
rafecolton
reviewed
May 25, 2026
Comment on lines
+274
to
+281
| if (requiredApprovingReviewCount === 0) { | ||
| console.log(`${owner}/${repo}#${number} targets ${context.baseRef}, which does not require approving reviews.`); | ||
| return; | ||
| } | ||
| if (approvers.length === 0) { | ||
| console.log(`${owner}/${repo}#${number} has no approving reviews from writers; regular branch protection will block merge until an approval exists.`); | ||
| return; | ||
| } |
Member
There was a problem hiding this comment.
Given this will cause the check to pass when they are are no reviews, we might need to run this on pull_request_review events too
rafecolton
reviewed
May 27, 2026
Comment on lines
+31
to
+34
| permission-contents: read | ||
| permission-members: read | ||
| permission-metadata: read | ||
| permission-pull-requests: read |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Details
Adds a ruleset-compatible workflow that validates pull requests have enough independent Expensify employee approvals before merge. The validator checks PR commits/co-authors, latest approving reviews, Expensify org membership, and repository write permission using Octokit REST APIs.
Related Issues
Prevent merging PRs that aren't peer reviewed
Manual Tests
Ran TypeScript and workflow validation locally:
Smoke tested the validator against real PRs using synthetic
pull_requestpayloads. Note: my local token could not read branch protection settings, so these runs exercised the fallback path requiring one independent approval.Linked PRs
N/A