Github.event.pull_request.number returns wrong PR number

${{ github.event.pull_request.number }} variable in GitHub Actions workflow scripts started to return wrong PR numbers. Is this a known bug?

Hi @koistya,

What event and type did you use in the workflow? The value comes from github context, different events could have different context content.

Please add below code to your yaml file, follow the structure (eg: event->pull_request->number…etc) for a check.

      - name: Dump GitHub context
          GITHUB_CONTEXT: ${{ toJson(github) }}
        run: echo "$GITHUB_CONTEXT"



1 Like