-
Notifications
You must be signed in to change notification settings - Fork 14
feat: Add Dependabot auto-merge workflow #425
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
base: v0.x.x
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a workflow to automatically approve and merge Dependabot pull requests.
- Introduces a GitHub Actions workflow gated to Dependabot actor.
- Configures auto-approval, labeling, and merge behavior for all dependency types.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @@ -0,0 +1,18 @@ | |||
| name: Dependabot Auto Manage | |||
| on: pull_request | |||
Copilot
AI
Oct 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Using on: pull_request without restricting event types causes the workflow to be evaluated for every pull request (then skipped via the if condition), creating unnecessary workflow invocations. Restrict with types: [opened, synchronize, reopened] or use pull_request_target if appropriate.
| on: pull_request | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] |
| steps: | ||
| - uses: ad/dependabot-auto-approve@v1 | ||
| with: | ||
| dependency-type: 'all' |
Copilot
AI
Oct 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Auto-merging all dependency types increases risk of merging breaking major updates or dev-only changes without review. Consider narrowing to 'production' or adding a versioning strategy (e.g., limiting to patch/minor) to reduce disruption.
| dependency-type: 'all' | |
| dependency-type: 'production' |
e063e9b to
d455da6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it, but this is probably not the best repository to add this to, because grpc/protobuf updates need manual intervention.
So I would add this as is to some other, non-API, repo first, and after this one is working, we can consider doing one or more of these:
- Add a feature to the auto-merge action to only auto-approve PRs that matches some regex (so we can exclude the
protobuf/grpcstuff) - Add some step/workflow to automatically fix the
protobuf/grpcupdates. - Disable
protobuf/grpcupdates and find another way to update those, normally we should probably only change these dependencies for major updates, there is not harm in supporting older versions, except maybe for patch updates, maybe for those we really want to re-generate the python files. But is something that needs more thought.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking as needs changes to avoid accidental merges, as merging this will be problematic if protobuf/grpc bumps are automatically merged.
Signed-off-by: Mathias L. Baumann <[email protected]>
d455da6 to
7e59a1d
Compare
This PR adds a GitHub workflow to automatically manage Dependabot pull requests.
This workflow uses the
ad/dependabot-auto-approve@v1GitHub Action, which may need to be explicitly whitelisted in the organization's settings.