From 7fd749237c37e84aabb12eb79880e39192207171 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Tue, 21 Jul 2020 09:53:31 -0500 Subject: [PATCH] adding it --- .github/workflows/automerge-dependabot.yml | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/automerge-dependabot.yml diff --git a/.github/workflows/automerge-dependabot.yml b/.github/workflows/automerge-dependabot.yml new file mode 100644 index 00000000..1e212ebf --- /dev/null +++ b/.github/workflows/automerge-dependabot.yml @@ -0,0 +1,47 @@ +--- +####################################### +####################################### +## Dependabot automerge dependencies ## +####################################### +####################################### + +# +# Documentation: +# https://medium.com/@toufik.airane/automerge-github-dependabot-alerts-with-github-actions-7cd6f5763750 +# + +###################### +# name of the action # +###################### +name: automerge on pull request + +############### +# When to run # +############### +on: [pull_request] + +################# +# Start the job # +################# +jobs: + automerge: + name: automerge dependabot + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: merge + uses: actions/github-script@0.2.0 + with: + script: | + github.pullRequests.createReview({ + owner: context.payload.repository.owner.login, + repo: context.payload.repository.name, + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }) + github.pullRequests.merge({ + owner: context.payload.repository.owner.login, + repo: context.payload.repository.name, + pull_number: context.payload.pull_request.number + }) + github-token: ${{github.token}}