-
Notifications
You must be signed in to change notification settings - Fork 8
Add Dependabot auto-merge workflow and migration script #466
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
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 adds Dependabot auto-merge functionality to streamline dependency updates. It creates a GitHub Actions workflow to automatically merge Dependabot PRs and updates the migration script to create this workflow and disable the CODEOWNERS review requirement for automated merges.
Key changes:
- Added new
auto-dependabot.yamlworkflow for automatic Dependabot PR merging - Updated migration script to create the workflow and modify GitHub ruleset settings
- Added/updated lockfile (
uv.lock) with project dependencies
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| uv.lock | Added complete dependency lockfile with pinned versions |
| auto-dependabot.yaml (multiple) | New GitHub Actions workflow for auto-merging Dependabot PRs |
| cookiecutter/migrate.py | Refactored migration script to create auto-merge workflow and disable CODEOWNERS requirement |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7000fbf to
3759886
Compare
3759886 to
12291ef
Compare
|
While testing in the FCR Repo I found it still didn't work and added the fix you see here, after which it finally worked |
6f887e0 to
c3d5f4d
Compare
|
Adds Migration script fixes:
The script writes the updated workflow file directly - users still need to review, commit with DCO+GPG, and create a PR. |
ef2b370 to
b9b8def
Compare
Signed-off-by: Mathias L. Baumann <[email protected]>
cookiecutter/{{cookiecutter.github_repo_name}}/.github/workflows/auto-dependabot.yaml
Outdated
Show resolved
Hide resolved
cookiecutter/{{cookiecutter.github_repo_name}}/.github/workflows/auto-dependabot.yaml
Outdated
Show resolved
Hide resolved
cookiecutter/{{cookiecutter.github_repo_name}}/.github/workflows/auto-dependabot.yaml
Outdated
Show resolved
Hide resolved
b9b8def to
94439fc
Compare
|
Updated the branch with some refactoring and cleanup:
|
llucax
left a comment
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.
2 small comments, feel free to force-merge if you want to fix them.
| - name: Auto-merge Dependabot PR | ||
| uses: frequenz-floss/dependabot-auto-approve@3cad5f42e79296505473325ac6636be897c8b8a1 # v1.3.2 | ||
| with: | ||
| github-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} |
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: To avoid any other issues with template interpretation, other workflows actually just wrap the whole file between {% raw %} and {% endraw %}, maybe it would be better to do it in this file too, as it would be rare that we want to use any other template features in it.
cookiecutter/migrate.py
Outdated
| except subprocess.CalledProcessError: | ||
| return False |
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: Print the exception for more context of why it failed?
- Add auto-dependabot.yaml workflow to auto-merge Dependabot PRs - Implement migration script functions to create workflow files - Add GitHub API integration to disable CODEOWNERS review requirement - Update all cookiecutter templates and golden test files Signed-off-by: Mathias L. Baumann <[email protected]>
Signed-off-by: Mathias L. Baumann <[email protected]>
1693937 to
688abed
Compare
Summary
frequenz-floss/dependabot-auto-approveactionChanges
First commit: Reset
cookiecutter/migrate.pyto template, removing old migration stepsSecond commit:
create_dependabot_auto_merge_workflow()functiondisable_codeowners_review_requirement()function to update GitHub rulesets