Skip to content

feat(agent-approval-check): re-evaluate on native reviews - #55

Merged
falcorocks merged 1 commit into
mainfrom
falcorocks/agent-approval-native-reviews
Aug 11, 2026
Merged

feat(agent-approval-check): re-evaluate on native reviews#55
falcorocks merged 1 commit into
mainfrom
falcorocks/agent-approval-native-reviews

Conversation

@falcorocks

Copy link
Copy Markdown
Collaborator

Summary

Adds pull_request_review to the action's supported events so a native GitHub Approve is counted immediately, instead of only being picked up on the next synchronize/push or /approve <sha> comment.

Why

The upstream design omits pull_request_review out of a merge-ref concern (not running a privileged, secret-bearing workflow from PR-influenced state). That concern is about workflows that check out and execute pull-request code. This action never does that — it only reads the GitHub API and posts a commit status, running its own SHA-pinned action code from the base-branch workflow. So pull_request_review is safe here, and using it removes the confusing UX where reviewers Approve natively but the required check appears stuck until someone comments.

Changes

  • resolve_pr_number handles pull_request_review (PR number from event.pull_request.number)
  • README: add the pull_request_review: [submitted, dismissed] trigger to the example, and correct the approval-behavior/known-limitations notes
  • unit test for the new event resolution

Consumer change

Workflows should add the pull_request_review trigger (see README).

Testing

  • python3 -m unittest discover -s actions/agent-approval-check -p 'test_*.py' -v (23 passing)

Trigger on pull_request_review so a native Approve is counted immediately,
instead of only on the next push or /approve comment. This action never checks
out or runs pull-request code (it reads the API and posts a status from pinned
action code), so the merge-ref concern that leads some workflows to omit
pull_request_review does not apply here.
@falcorocks
falcorocks requested review from a team as code owners August 11, 2026 15:08
@falcorocks falcorocks self-assigned this Aug 11, 2026
@falcorocks
falcorocks merged commit 59a4eba into main Aug 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant