Add Dependabot auto-merge#59
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e556ca5d0
ℹ️ 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.
Provide repository context to gh commands
This workflow invokes gh pr list/view/merge without --repo (or GH_REPO) and without an actions/checkout step, so on workflow_run jobs the CLI may not have a local git repository context to resolve the target repo; in that case the first gh pr list call fails and the auto-merge path never runs. The gh docs describe GH_REPO as required for commands that otherwise operate on a local repository, so this should explicitly pass GH_REPO: ${{ github.repository }} or --repo ${{ github.repository }} for each command.
Useful? React with 👍 / 👎.
Enable automatic merging for Dependabot PRs after CI succeeds, and suppress semver major dependency updates for safety.