From f3ab0410752152dcdf18b03d7d00b7a350bc064d Mon Sep 17 00:00:00 2001 From: Michele Bertasi Date: Mon, 2 May 2022 22:10:24 +0200 Subject: [PATCH] Auto-merge Google API changes. Don't merge all possible dependency changes, only the ones coming from dependabot and for Google APIs. The rest still needs manual merges. This should alleviate the burden of reviewing these every week. --- .github/workflows/dependabot-automerge.yml | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/dependabot-automerge.yml diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml new file mode 100644 index 00000000..cd2ed55d --- /dev/null +++ b/.github/workflows/dependabot-automerge.yml @@ -0,0 +1,26 @@ +name: Dependabot auto-merge +on: pull_request + +permissions: + contents: write + +jobs: + dependabot: + runs-on: ubuntu-latest + strategy: + matrix: + safe-dependency: + - "google.golang.org/api" + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v1.1.1 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Enable auto-merge for Dependabot PRs + if: ${{contains(steps.metadata.outputs.dependency-names, matrix.safe-dependency)}} + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}