Khan / pull-request-comment-trigger

A github action for detecting a "trigger" in a pull request description or comment
207 stars 91 forks source link

Perfect in combination with xt0rted/pull-request-comment-branch #8

Open janpio opened 3 years ago

janpio commented 3 years ago

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

BhumikaSaini commented 2 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