From ba4ebba140f0a5252efa6f712dde32601c5f4157 Mon Sep 17 00:00:00 2001 From: Timothy Rule <90191439+timrulebosch@users.noreply.github.com> Date: Mon, 20 Apr 2026 09:29:19 +0200 Subject: [PATCH] Refactor Dependabot workflow conditions and steps Signed-off-by: Timothy Rule <90191439+timrulebosch@users.noreply.github.com> --- .github/workflows/dependabot.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependabot.yaml b/.github/workflows/dependabot.yaml index 42d2fa0..179287f 100644 --- a/.github/workflows/dependabot.yaml +++ b/.github/workflows/dependabot.yaml @@ -10,16 +10,17 @@ permissions: jobs: dependabot: runs-on: ubuntu-latest - if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == "${{github.event.repository.name}}" + if: github.event.pull_request.user.login == 'dependabot[bot]' steps: - name: Dependabot metadata id: metadata uses: dependabot/fetch-metadata@v2 with: github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Enable auto-merge for Dependabot PRs if: contains(github.event.pull_request.labels.*.name, 'automerge') && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor') run: gh pr merge --squash --auto "$PR_URL" env: - PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}