Add Dependabot auto-merge#54
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d47ea59942
ℹ️ 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_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| BRANCH_NAME="${{ github.event.workflow_run.head_branch }}" | ||
| PR_NUMBER=$(gh pr list --state open --head "${BRANCH_NAME}" --json number --jq '.[0].number // empty') |
There was a problem hiding this comment.
Pass repository context to gh commands
This job never checks out the repository and also doesn't pass --repo/GH_REPO, but it invokes gh pr subcommands that operate on a local repo context by default. In a fresh GitHub Actions workspace, gh pr list/view/merge can fail before any merge logic runs, so Dependabot PRs will not be auto-merged. The GitHub CLI docs explicitly call out GH_REPO for commands that otherwise use a local repository, so this workflow should either add actions/checkout or provide explicit repo context on each gh call.
Useful? React with 👍 / 👎.
Enable automatic merging for Dependabot PRs after CI succeeds, and suppress semver major dependency updates for safety.