Skip to content

Commit

Permalink
Auto-merge Google API changes.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mbrt committed May 2, 2022
1 parent d736aad commit f3ab041
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .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}}

0 comments on commit f3ab041

Please sign in to comment.