WorkflowName and triggering event on checkRun API

There is no additional information about which worklfow a checkRun belongs to on checkRunApi

And there is no information about which event triggered the checkRun. Events like pull_request/push

Any help would be appreciated.

Hi @qfc ,

checkrun rest api doesn’t contain workflow name aknd triggering event type.  These information can be found in github context content. You can get the workflow name and event type with below code:

      - name: Dump GitHub context
          GITHUB_CONTEXT: ${{ toJson(github) }}
        run: echo "$GITHUB_CONTEXT"
      - name: check workflowname
        run: |
          echo ${{ github.workflow }}
      - name: check eventname
        run: |
          echo ${{ github.event_name }}


If you’d like any improvement of checkrun rest api, it’s recommended to raise your idea here where github manager will take a review.


1 Like

Thanks a lot!