Add owner approval policy check#178
Conversation
|
Claude finished @jbohnslav's task in 1s —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 04950ed513
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| } | ||
|
|
||
| if (ownerReviewState === "APPROVED") { |
There was a problem hiding this comment.
Require owner approval for the current head
Because this accepts any latest APPROVED review from jbohnslav without checking that the review was submitted for pr.head.sha, a contributor can get approval, push new commits, and the synchronize run will still find the old approval and pass the required status check. That lets unreviewed code satisfy the owner-approval policy; filter approvals by the current head commit (for example review.commit_id === pr.head.sha) before returning success.
Useful? React with 👍 / 👎.
Adds an owner-approval-policy workflow that passes automatically for PRs authored by @jbohnslav and requires an active @jbohnslav approval for PRs by anyone else. This lets the repository ruleset require the policy as a status check instead of requiring native GitHub approval on owner-authored PRs.