Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 3

WorkflowName and triggering event on checkRun API

Solved! Go to Solution.

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

2 Replies
Highlighted
Solution
GitHub Partner
Message 2 of 3

Re: WorkflowName and triggering event on checkRun API

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!

Highlighted
Copilot Lvl 2
Message 3 of 3

Re: WorkflowName and triggering event on checkRun API

Thanks a lot!