Is it possible to delete a Check Run? Or report netural status on a Check Suite w/o a run?

I work at a company that allows you to deploy cloud infrastructure using code. And we have a GitHub application that surfaces the changes to your cloud infrastructure that were previewed/applied as part of a pull request. (You can get more context here.)

The problem is that by the nature of how our system works, we don’t know ahead of time what will actually happen for a given commit. Rather, we rely on the user to have configured their CI/CD system to invoke our command-line tool. And we then surface those results by reporting new GitHub check runs.

This leads to the unfortunate UX where if the commit didn’t end up making any cloud infrastructure changes, the Check Suite associated with our GitHub app doesn’t report any Check Runs. And the GitHub UI just says “Queued XX minutes ago”. (And later “Queued XX days ago”.)

I’d like to improve this if possible, though the API docs indiciate this isn’t really possible. So this is generally feedback on a scenario which doesn’t fit well into the current design.

(1) Is there a way to have the GitHub app immediately report a “neutral” status for the Check Suite, without creating a new Check Run? Rather than being in the “Queued” state, is it possible to report a neutral status immediately?

(2) If not, we can just as easily create a “placeholder” Check Run. With a descriptive title like “waiting for updates”. However, if we do that, is it possible to delete that Check Run later? It doesn’t make sense to show “waiting for updates” along side of the updates that eventually took place.

Thanks for reaching out.

Here’s my understanding of the Checks flow from the documentation:

  1. Someone pushes code to the repository
  2. GitHub creates a Check Suite object and pushes a check_suite webhook event to your GitHub App
  3. At this point, if your app does nothing you get the “Queued XX YY ago” behavior you’re describing
  4. Your GitHub App creates a Check Run object with the resulting status
  5. The Check Suite object aggregates all of the Check Run objects’ status into a single result

What it sounds like you’re currently doing is that when you receive a check_suite webhook event, and your command-line app doesn’t get called, no Check Run object is created and you end up at the failure case of 2i above.

No, there isn’t a way to delete a Check Run object, so the key to your question is what to do in step 3 above. What I would suggest is to immediately create the Check Run object with the in_progress status as described in the Check Run documentation. Then, when you’ve determined that nothing is supposed to happen, you can update (not delete) that Check Run object with a status of completed and whatever output you want.

I hope that helps!

1 Like

@lee-dohm can you please share how do I update the check run status ? because I want to update the check run status to failure but I get the error 

ERROR HttpError: Invalid app_id #appIdNumber

Method used:


Any suggestion ?

The error you’re seeing is that you’re supplying an invalid app ID number. This makes me think that you’re doing something wrong during the authentication steps or you’re attempting to manipulate a check run belonging to a different installation or something.

I hope that helps.

Thanks for the reply. Even I was thinking about the same but I am able to create run without any problems. Only updating a check run is giving me this error. 

You may want to contact private support at then so that we can take a deeper look at your configuration and exactly what parameters you’re passing to the API calls.

1 Like

sure @lee-dohm . Will do. Thanks again :slight_smile:

Leave it do not remove it !

Placeholder marketplace or system abide or marketplace allowences