From dba1737aedfa148362d945c40920a3384047cfac Mon Sep 17 00:00:00 2001 From: Philipp Schmelter Date: Wed, 21 May 2025 17:48:28 +0200 Subject: [PATCH 1/3] dependabot-auto-merge.yml --- .github/CODEOWNERS | 5 +++++ .github/workflows/dependabot-auto-merge.yml | 13 +++++++++++++ CHANGELOG.md | 3 +++ 3 files changed, 21 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..2605b5d32 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,5 @@ +# Reviewers for Dependabot PRs +build.gradle @sebastian-peter @danielfeismann @staudtMarius + +# Reviewers for CI/CD related PRs +.github/workflows/ @sebastian-peter @PhilippSchmelter diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index aa7c41713..5ed781fd6 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -16,6 +16,19 @@ jobs: with: github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Check Snapshot + if: contains(steps.metadata.outputs.new-version, 'snap') + run: | + echo "::error::Snapshot versions are not allowed – workflow stopped." + exit 1 + + - name: Approve the PR + if: steps.metadata.outputs.update-type == 'version-update:semver-patch' + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Enable auto-merge for Dependabot PRs if: steps.metadata.outputs.update-type == 'version-update:semver-patch' run: gh pr merge --auto --merge "$PR_URL" diff --git a/CHANGELOG.md b/CHANGELOG.md index 064b97b1b..2f4b8956a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] +### Changed +- Updated dependabot workflow and added CODEOWNERS [#]() + ## [7.0.0] - 2025-05-08 ### Added From 54037a1ac58d63c60579f4b120afb1f6a8ac9555 Mon Sep 17 00:00:00 2001 From: Philipp Schmelter Date: Wed, 21 May 2025 17:49:21 +0200 Subject: [PATCH 2/3] dependabot-auto-merge.yml fix --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f4b8956a..dd930a42b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] ### Changed -- Updated dependabot workflow and added CODEOWNERS [#]() +- Updated dependabot workflow and added CODEOWNERS [#1328](https://github.com/ie3-institute/PowerSystemDataModel/issues/1328) ## [7.0.0] - 2025-05-08 From ebfc31353c19e36c3d0a35674bbb30a2fd338e7c Mon Sep 17 00:00:00 2001 From: Philipp Schmelter Date: Wed, 21 May 2025 18:03:04 +0200 Subject: [PATCH 3/3] dependabot.yml --- .github/dependabot.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 467a2f6b8..4dd23974a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,12 +7,6 @@ updates: time: "04:00" open-pull-requests-limit: 10 target-branch: dev - reviewers: - - t-ober - - staudtMarius - - sebastian-peter - - danielfeismann - - jo-bao - package-ecosystem: pip directory: "/docs/readthedocs"