From 346ce8aa798b5ded45663b2dadf6decc37ea4915 Mon Sep 17 00:00:00 2001 From: Raphael Simon Date: Wed, 27 Aug 2025 22:44:56 -0700 Subject: [PATCH] ci: weekly auto-merge of Dependabot PRs --- .../workflows/dependabot-weekly-automerge.yml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/dependabot-weekly-automerge.yml diff --git a/.github/workflows/dependabot-weekly-automerge.yml b/.github/workflows/dependabot-weekly-automerge.yml new file mode 100644 index 00000000..320448bf --- /dev/null +++ b/.github/workflows/dependabot-weekly-automerge.yml @@ -0,0 +1,24 @@ +name: Weekly auto-merge Dependabot PRs +on: + schedule: + - cron: '0 6 * * 1' + workflow_dispatch: +permissions: + contents: write + pull-requests: write +jobs: + automerge: + runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v5 + - name: Merge clean Dependabot PRs + run: | + set -euo pipefail + prs=$(gh pr list --state open --search 'author:app/dependabot' --json number,mergeStateStatus -L 200 \ + | jq -r '.[] | select(.mergeStateStatus=="CLEAN") | .number') + for n in $prs; do + echo "Enabling auto-merge for #$n" + gh pr merge "$n" --squash --auto --delete-branch || true + done