[codex] Automate Dependabot maintenance#18
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 55fffc24c3
ℹ️ 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".
| run: | | ||
| set -euo pipefail | ||
| BRANCH_NAME="${{ github.event.workflow_run.head_branch }}" | ||
| PR_NUMBER=$(gh pr list --repo "${GITHUB_REPOSITORY}" --state open --head "${BRANCH_NAME}" --json number --jq '.[0].number // empty') |
There was a problem hiding this comment.
Verify the PR head before merging
When Dependabot pushes a new commit or rebases the branch while an older CI run is still completing, this branch-only lookup can resolve the same PR and the later merge step will merge the current head even though the successful workflow_run belongs to an older github.event.workflow_run.head_sha. Unless branch protection independently blocks stale statuses, this can auto-merge an untested dependency update; include the PR head SHA in the view output and compare it with the workflow run SHA before setting should_merge.
Useful? React with 👍 / 👎.
Summary
Validation