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.
Solved! Solved! Go to Solution.
Thanks for reaching out.
Here's my understanding of the Checks flow from the documentation:
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!