Skip to content

Commit 4b1aa9a

Browse files
authored
Add Dependabot auto-merge workflow and migration script (#466)
## Summary - Adds auto-merge workflow for Dependabot PRs using `frequenz-floss/dependabot-auto-approve` action - Includes migration script to create workflow file and disable CODEOWNERS review requirement via GitHub API - Splits changes into two commits: reset migration script to template, then add new migration steps ## Changes **First commit:** Reset `cookiecutter/migrate.py` to template, removing old migration steps **Second commit:** - Add `create_dependabot_auto_merge_workflow()` function - Add `disable_codeowners_review_requirement()` function to update GitHub rulesets - Include workflow template in cookiecutter - Regenerate golden test files
2 parents ee1906a + 688abed commit 4b1aa9a

File tree

9 files changed

+354
-167
lines changed

9 files changed

+354
-167
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Auto-merge Dependabot PR
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
jobs:
11+
auto-merge:
12+
if: github.actor == 'dependabot[bot]'
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Auto-merge Dependabot PR
16+
uses: frequenz-floss/dependabot-auto-approve@3cad5f42e79296505473325ac6636be897c8b8a1 # v1.3.2
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}
19+
dependency-type: 'all'
20+
auto-merge: 'true'
21+
merge-method: 'merge'
22+
add-label: 'tool:auto-merged'

RELEASE_NOTES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ But you might still need to adapt your code:
2929
- New warning ignores for protobuf gencode versions in pytest.
3030
- mkdocstrings: Updated the deprecated `import` config key to `inventories` in `mkdocs.yml`.
3131
- Dependencies have been updated.
32+
- Added Dependabot auto-merge workflow using `frequenz-floss/dependabot-auto-approve` action.
33+
- Migration script now creates auto-merge workflow and disables CODEOWNERS review requirement via GitHub API.
3234

3335
## Bug Fixes
3436

0 commit comments

Comments
 (0)