diff --git a/.github/workflows/dependabot-auto-merge.yaml b/.github/workflows/dependabot-auto-merge.yaml deleted file mode 100644 index 95f57ed..0000000 --- a/.github/workflows/dependabot-auto-merge.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: Auto-merge Dependabot PRs - -on: - pull_request: - types: - - opened - - reopened - - synchronize - - ready_for_review - - labeled - -jobs: - enable-automerge: - # Only run on Dependabot PRs - if: github.actor == 'dependabot[bot]' - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - - steps: - - name: Fetch Dependabot metadata - id: metadata - uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Auto-approve Dependabot PR - uses: hmarr/auto-approve-action@v4 - with: - github-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 --squash "$PR_URL" - env: - PR_URL: ${{ github.event.pull_request.html_url }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index e8ab100..660fd73 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -312,8 +312,35 @@ jobs: - name: poetry test publish run: poetry publish -r testpypi + + dependabot-automerge: + # Only run on Dependabot PRs + if: github.actor == 'dependabot[bot]' + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + + steps: + - name: Fetch Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Auto-approve Dependabot PR + uses: hmarr/auto-approve-action@v4 + with: + github-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 --squash "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - slack-notification: + dependabot-slack-notification: runs-on: ubuntu-latest needs: - coverage