diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 08fcf48a..3b808a90 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,5 +7,3 @@ updates: target-branch: "dev" labels: - "gomod dependencies" - reviewers: - - "neelvirdy" diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 00000000..c8350175 --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,27 @@ +# .github/workflows/automerge.yml + +name: Dependabot auto-merge + +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + # GitHub provides this variable in the CI env. You don't + # need to add anything to the secrets vault. + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Approve a PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}