-
Notifications
You must be signed in to change notification settings - Fork 6
Add auto-approve and auto-merge for Dependabot PRs #211
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
Conversation
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
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
This PR introduces an automated workflow for managing Dependabot pull requests. The workflow automatically approves, merges, and labels Dependabot PRs to streamline dependency updates.
Key changes:
- Adds a GitHub Actions workflow that triggers on all pull requests
- Configures automatic approval and merging for all Dependabot dependency updates
- Sets up appropriate permissions for the workflow to modify content and pull requests
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| runs-on: ubuntu-latest | ||
| if: github.actor == 'dependabot[bot]' | ||
| steps: | ||
| - uses: frequenz-floss/dependabot-auto-approve@v1 |
Copilot
AI
Oct 30, 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.
Using a floating version tag (@v1) for a GitHub Action poses security risks. Pin to a specific commit SHA to ensure the workflow uses a known, immutable version. This prevents potential supply chain attacks if the action's v1 tag is moved to malicious code.
| - uses: frequenz-floss/dependabot-auto-approve@v1 | |
| - uses: frequenz-floss/dependabot-auto-approve@c2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2 |
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.
The source repo is under our control, so this adds convenience in staying major-version up-to-date
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 agree, no sense pinning it down further unless we see actual issues from now on.
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 disagree, I think pinning is a good practice no matter what, our own repo could also get somehow compromised, and speaking of the devil, dependabot will be there to keep us up to date.
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.
haha, the last argument is a pretty good one in that respect
Uses our own fork.