Workflow_dispatch does not update commit status


Thanks for adding the workflow_dispatch feature — pretty helpful overall :grin:

We’ve been interested in using this to re-run certain pull request checks based on events — for example, updating a PR check based on a change in the main branch.

However, when running a workflow through workflow_dispatch, it doesn’t appear to update the commit status. The commit still shows the previous run, and the pull request also continues to show with a successful check.

Is there a way (other than manually managing the commit status through the API) to have workflow_dispatch affect the relevant commit status? Thanks!

1 Like


On the Checks of a pull request, GitHub only lists the jobs from the workflows triggered by the events related to pull request. Such as pull_request, pull_request_review, pull_request_review_comment and pull_request_target.

In addition, the jobs in the workflow triggered by push event in the head branch (source branch) of the PR, also will be listed as checks on the PR. In this situation, the push event is related to the PR.

However, the workflow_dispatch is not one of the related events. So when you manually trigger the workflow in the head branch of the PR, the jobs in this workflow will not be listed as checks on the PR.


Is my explanation helpful for you to understand?
If you have any other questions about this topic, feel free to tell us. Thanks.

@brightran yes this helps! It sounds like we’ll have to use the commit status API to manage it manually if we’d like to implement things this way, thanks for confirming which events will affect the PR checks.

You’re welcome, @kyeah .

@brightran Sorry to bother you but I wanted to check on what you said about events showing up in PR Checks.

I wrote a workflow which fails if there are unresolved comments and it triggers on pull_request_review_comment but when I edit/create/delete comments the success/failure doesn’t get associated with the PR and only shows up in the repository ‘Actions’ tab.

Is that intentional?