From 67baf0c4d033be6ad81135db921132b3640e6bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Wed, 14 Jan 2026 06:27:44 +0100 Subject: [PATCH] chore(dependabot): update schedule to daily and set open pull requests limit --- .github/dependabot.yml | 3 +- .github/workflows/dependabot-auto-merge.yml | 32 +++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/dependabot-auto-merge.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 04ceb6e8..159c96d4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,5 +2,6 @@ version: 2 updates: - package-ecosystem: "maven" directory: "/" + open-pull-requests-limit: 10 schedule: - interval: "weekly" + interval: "daily" diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 00000000..f4e7e936 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,32 @@ +name: Auto-merge Dependabot PRs + +on: + pull_request_target: + types: [opened, reopened, synchronize, ready_for_review, labeled] + +jobs: + automerge: + if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + checks: read + steps: + - name: Fetch Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Approve PR + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh pr review --approve "$PR_URL" + + - name: Enable auto-merge + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh pr merge --auto --squash "$PR_URL"