Skip to content

Add steps to approve and auto-merge Dependabot PRs#250

Merged
bourgeoa merged 1 commit intomainfrom
dependabot-automerge
Apr 13, 2026
Merged

Add steps to approve and auto-merge Dependabot PRs#250
bourgeoa merged 1 commit intomainfrom
dependabot-automerge

Conversation

@bourgeoa
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 13, 2026 13:42
@bourgeoa bourgeoa enabled auto-merge April 13, 2026 13:42
@bourgeoa bourgeoa disabled auto-merge April 13, 2026 13:43
@bourgeoa bourgeoa merged commit 0ae6feb into main Apr 13, 2026
9 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the CI workflow to automatically review and enable auto-merge on Dependabot-authored pull requests after the build job completes.

Changes:

  • Add a step to fetch Dependabot metadata (update type).
  • Automatically approve Dependabot PRs via GitHub CLI.
  • Enable auto-merge only for semver patch/minor updates.
Comments suppressed due to low confidence (1)

.github/workflows/ci.yml:70

  • The gh CLI is authenticated via GH_TOKEN in the previous step, but this step sets GITHUB_TOKEN. While gh may read both in some contexts, using a single variable consistently (e.g., GH_TOKEN) reduces ambiguity and avoids auth failures if environment expectations change.
        env:
          PR_URL: ${{github.event.pull_request.html_url}}
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +60 to +64
- name: Approve Dependabot PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge for Dependabot PRs
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
run: gh pr merge --auto --merge "$PR_URL" # Use Github CLI to merge automatically the PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants