Skip to content

Commit

Permalink
fix: automerge for dependabot (#2677)
Browse files Browse the repository at this point in the history
  • Loading branch information
salmanm committed Nov 6, 2020
1 parent 7d54acc commit 8924f4e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 30 deletions.
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ updates:
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- "dependabot"
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,25 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

automerge:
needs: test
runs-on: ubuntu-latest
steps:
- name: Dependabot Auto Merge
uses: actions/github-script@v3
if: ${{ github.actor == 'dependabot[bot]' }}
with:
github-token: ${{secrets.github_token}}
script: |
github.pulls.createReview({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
pull_number: context.payload.pull_request.number,
event: 'APPROVE'
})
github.pulls.merge({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
pull_number: context.payload.pull_request.number
})
28 changes: 0 additions & 28 deletions .github/workflows/dependabot-auto-merge.yml

This file was deleted.

0 comments on commit 8924f4e

Please sign in to comment.