fix Dependabot review request races#129
Conversation
Co-Authored-By: Codex <noreply@openai.com>
🤖 Codex PR Review✅ Merge allowed: 1 finding(s) reported but none are blocking ℹ️ Other Findings1. 🟡 [MEDIUM] Logic in
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b86dcb2ee
ℹ️ 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".
| gh api --method POST \ | ||
| "repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}/requested_reviewers" \ | ||
| -f "reviewers[]=${REVIEWER}" |
There was a problem hiding this comment.
Avoid restoring a subsequently removed review request
If a maintainer removes Pigbibi's review request after the second timeline read but before this POST, the most recent review_requested event still identifies that maintainer, so this branch recreates the request they intentionally canceled. The cleanup workflow should also account for a later review_request_removed event (or re-check the current review-request state) before restoring it.
Useful? React with 👍 / 👎.
What changed
Why
This closes the remaining race between validating a bot-generated review request and deleting it. Human requests are preserved whether they happen before, during, or after the cleanup operation.
Validation