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. 

https://developer.github.com/v3/checks/runs/#get-a-single-check-run

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:

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

workflownameandevent.png

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.

Thanks!

1 Like

Thanks a lot!