From 8ab3dcc623cc0974d69d9ca59afc799ba9ae3cd4 Mon Sep 17 00:00:00 2001 From: Mike <22396211+Dresdn@users.noreply.github.com> Date: Fri, 22 May 2026 17:10:22 -0700 Subject: [PATCH] ci: improve Dependabot automation --- .github/dependabot.yml | 47 +++++++++++++++------ .github/workflows/dependabot-auto-merge.yml | 25 +++++++++++ 2 files changed, 60 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/dependabot-auto-merge.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f079ffa..f9f2e0b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,15 +1,38 @@ version: 2 updates: -- package-ecosystem: pip - directory: "/" - schedule: - interval: daily - time: "02:00" - open-pull-requests-limit: 10 + - package-ecosystem: pip + directory: "/" + schedule: + interval: daily + time: "02:00" + cooldown: + default-days: 7 + open-pull-requests-limit: 10 + groups: + test-dependencies: + patterns: + - "pytest*" + - "mypy" + - "ruff" + - "hypothesis" + - "safety" + - "doc8" + commit-message: + prefix: "chore" + include: "scope" -- package-ecosystem: github-actions - directory: "/" - schedule: - interval: daily - time: "02:00" - open-pull-requests-limit: 10 + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily + time: "02:00" + cooldown: + default-days: 7 + open-pull-requests-limit: 10 + groups: + github-actions: + patterns: + - "*" + commit-message: + prefix: "ci" + include: "scope" diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 0000000..33dd12e --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,25 @@ +name: Dependabot auto-merge + +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + auto-merge: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: Fetch Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v2 + + - name: Auto-merge patch and minor updates + if: | + steps.metadata.outputs.update-type == 'version-update:semver-patch' || + steps.metadata.outputs.update-type == 'version-update:semver-minor' + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}