From f92b97ec2be1251180f23e06d33e391c527380b9 Mon Sep 17 00:00:00 2001 From: Abdelouahab Bella Date: Sat, 28 Sep 2024 22:56:43 -0700 Subject: [PATCH] Update auto-merge-dependabot.yml --- .github/workflows/auto-merge-dependabot.yml | 23 +++++++++++---------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/auto-merge-dependabot.yml b/.github/workflows/auto-merge-dependabot.yml index 3edeaa4..7315fcd 100644 --- a/.github/workflows/auto-merge-dependabot.yml +++ b/.github/workflows/auto-merge-dependabot.yml @@ -9,19 +9,20 @@ jobs: if: github.actor == 'dependabot[bot]' steps: - - name: automerge - uses: actions/github-script@0.2.0 + - name: Automerge + uses: actions/github-script@latest with: script: | - github.pullRequests.createReview({ - owner: context.payload.repository.owner.login, - repo: context.payload.repository.name, + console.log("Context: ", context); + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, pull_number: context.payload.pull_request.number, event: 'APPROVE' - }) - github.pullRequests.merge({ - owner: context.payload.repository.owner.login, - repo: context.payload.repository.name, + }); + await github.pulls.merge({ + owner: context.repo.owner, + repo: context.repo.repo, pull_number: context.payload.pull_request.number - }) - github-token: ${{github.token}} + }); + github-token: ${{ secrets.GITHUB_TOKEN }}