gh-find-current-pr
gh-find-current-pr copied to clipboard
Action triggered on closed PR does not seem to find the PR number correctly
I am using this in a job that triggers when a PR is closed:
on:
pull_request:
types: [closed]
like this:
- name: Detect Pull Request
uses: jwalton/gh-find-current-pr@v1
id: findPr
with:
state: all
but later, when I use this:
env:
PR_NUM: ${{ steps.findPr.outputs.pr }}
That value is empty...
I initially was using
- name: Detect Pull Request
uses: jwalton/gh-find-current-pr@v1
id: findPr
with:
state: closed
But that did not work any differently.
So, in my use case it turns out that simply using:
env:
PR_NUM: ${{ github.event.pull_request.number }}
instead of this action works as expected.
the same issue with state input.. simply doesn't get the PR number when closed event happen
I think this action should short circuit if the github.event.pull_request.number is present... then just use octokit to fetch that PR.