From 00787f5013f129f4885f4d8066157d63fbf3b72d Mon Sep 17 00:00:00 2001 From: Jimmy Briggs Date: Mon, 29 Apr 2024 19:55:03 -0400 Subject: [PATCH] bug: attempt to fix dependabot.yml automerge --- .github/workflows/dependabot.yml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 2a64e7a..6178f92 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -18,9 +18,25 @@ jobs: uses: dependabot/fetch-metadata@v2 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Auto-Merge - id: automerge - run: gh pr merge --auto --merge "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + #- name: Auto-Merge + # id: automerge + # run: gh pr merge --auto --merge "$PR_URL" + # env: + # PR_URL: ${{github.event.pull_request.html_url}} + # GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: AutoMerge + 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}}