-
Notifications
You must be signed in to change notification settings - Fork 4
Automate Dependabot minor/patch PR approvals & merges #476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
thomasturrell
merged 12 commits into
main
from
copilot/automate-dependabot-pr-approvals
Jan 21, 2026
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5501957
Initial plan
Copilot 387144d
Add Dependabot automation for minor/patch updates
Copilot 54c3e3f
Apply suggestion from @thomasturrell
thomasturrell 0b10224
Update .github/workflows/dependabot-auto-approve.yml
thomasturrell 4a04562
Update .github/workflows/dependabot-auto-merge.yml
thomasturrell 0e73cd7
Address PR review feedback
Copilot 5ac1903
Add action check to auto-merge workflow
Copilot 66afc7e
Add Maven plugin dependencies to auto-merge group
Copilot baee690
Update .github/workflows/dependabot-auto-approve.yml
thomasturrell 0d76b17
Apply PR review feedback
Copilot a83e9fb
Fix token consistency in workflows
Copilot 27d5545
Use activity type in pull_request_review trigger
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| name: Dependabot Auto-Approve | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, reopened] | ||
|
|
||
| permissions: | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| auto-approve: | ||
| runs-on: ubuntu-latest | ||
| if: github.event.pull_request.user.login == 'dependabot[bot]' | ||
| steps: | ||
| - name: Get Dependabot metadata | ||
| id: metadata | ||
| uses: dependabot/fetch-metadata@v2 | ||
| with: | ||
| github-token: "${{ github.token }}" | ||
| - name: Approve minor and patch updates | ||
| if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' | ||
| run: | | ||
| gh pr review --approve "$PR_URL" | ||
| env: | ||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||
| GH_TOKEN: ${{ github.token }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: Dependabot Auto-Merge | ||
|
|
||
| on: | ||
| pull_request_review: | ||
| types: [submitted] | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| auto-merge: | ||
| runs-on: ubuntu-latest | ||
| if: github.event.review.state == 'approved' && github.event.pull_request.user.login == 'dependabot[bot]' | ||
| steps: | ||
| - name: Get Dependabot metadata | ||
| id: metadata | ||
| uses: dependabot/fetch-metadata@v2 | ||
| with: | ||
| github-token: "${{ github.token }}" | ||
| - name: Enable auto-merge for minor and patch updates | ||
| if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' | ||
| run: | | ||
| gh pr merge --auto --squash "$PR_URL" | ||
| env: | ||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||
| GH_TOKEN: ${{ github.token }} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.