From cb382df916194c08e84c6e26b6b2b8d703eb56db Mon Sep 17 00:00:00 2001 From: ChevCellios Date: Sat, 15 Aug 2026 23:18:31 +0200 Subject: [PATCH] Auto-merge Dependabot patch updates --- .github/dependabot.yml | 8 ++++-- .github/workflows/dependabot-automerge.yml | 33 ++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/dependabot-automerge.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d4fb9ab..2f0117e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,9 +9,11 @@ updates: timezone: "Europe/Zagreb" open-pull-requests-limit: 5 groups: - nuget-dependencies: + nuget-patch-dependencies: patterns: - "*" + update-types: + - "patch" - package-ecosystem: "github-actions" directory: "/" @@ -22,6 +24,8 @@ updates: timezone: "Europe/Zagreb" open-pull-requests-limit: 5 groups: - github-actions: + github-actions-patch-dependencies: patterns: - "*" + update-types: + - "patch" diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml new file mode 100644 index 0000000..be58571 --- /dev/null +++ b/.github/workflows/dependabot-automerge.yml @@ -0,0 +1,33 @@ +name: Dependabot patch auto-merge + +on: + pull_request_target: + types: + - opened + - reopened + - synchronize + +permissions: + contents: write + pull-requests: write + +jobs: + enable-auto-merge: + name: Enable auto-merge for patch updates + if: github.actor == 'dependabot[bot]' + runs-on: ubuntu-latest + timeout-minutes: 5 + + steps: + - name: Read Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7 # v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Enable squash auto-merge + if: steps.metadata.outputs.update-type == 'version-update:semver-patch' + run: gh pr merge --auto --squash "$PR_URL" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ github.event.pull_request.html_url }}