0

I have GitHub action that approves a Pull Request:

      - name: Approve a PR
        run: gh pr review --approve "$PR_URL"
        env:
          PR_URL: ${{github.event.pull_request.html_url}}
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

When action runs approval is performed by github-actions. Is there any way to perform gh pr review --approve as different user?

pixel
  • 24,905
  • 36
  • 149
  • 251
  • Wouldn't it be possible to perform a `gh auth login` with a different user in the step before running the `gh pr review` command? – GuiFalourd Jan 11 '22 at 13:33

1 Answers1

0

I can just use a token for a different user in GITHUB_TOKEN field.

pixel
  • 24,905
  • 36
  • 149
  • 251