Add Dependabot auto-merge workflow and migration script#466
Add Dependabot auto-merge workflow and migration script#466Marenz merged 3 commits intofrequenz-floss:v0.x.xfrom
Conversation
There was a problem hiding this comment.
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 <mathias.baumann@frequenz.com>
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.
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.
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.
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 <mathias.baumann@frequenz.com>
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
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