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/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" 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..dd930a42b 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 [#1328](https://github.com/ie3-institute/PowerSystemDataModel/issues/1328) + ## [7.0.0] - 2025-05-08 ### Added