Open janpio opened 3 years ago
Alternatively, if the requirement is to just checkout the PR, the following can also be done:
- name: Checkout pull request
if: steps.check.outputs.triggered == 'true'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: hub pr checkout ${{github.event.issue.number}}
source: https://github.com/actions/checkout/issues/331#issuecomment-864124935
This action helped me to get the branch name of the PR the comment was put onto so I could check out the correct code: https://github.com/xt0rted/pull-request-comment-branch
https://github.com/prisma/prisma-labelsync/blob/e9736242a701df4d145471a95ee8d9c927726ec3/.github/workflows/labelsync.yml#L12-L30