From bc587649d5ba85d6f87b89bc7b5d41720651de91 Mon Sep 17 00:00:00 2001 From: Salman Date: Tue, 10 Nov 2020 20:26:35 +0530 Subject: [PATCH] chore: dependabot auto merge --- .github/dependabot.yml | 7 ++++--- .github/workflows/ci.yml | 24 +++++++++++++++++++++++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e1eab5a..3d3a116 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,7 @@ version: 2 updates: - - package-ecosystem: "npm" - directory: "/" + - package-ecosystem: npm + directory: '/' schedule: - interval: "daily" \ No newline at end of file + interval: daily + open-pull-requests-limit: 10 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2c843e..7c353ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,4 +33,26 @@ jobs: env: TEST_PROJECT_ID: ${{ secrets.TEST_PROJECT_ID }} GOOGLE_APPLICATION_CREDENTIALS: ./key.json - run: npm run test:ci \ No newline at end of file + run: npm run test:ci + + automerge: + needs: build + 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 + })