Is it possible to delete a Check Run? Or report netural status on a Check Suite w/o a run? #24799
-
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. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
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 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 I hope that helps! |
Beta Was this translation helpful? Give feedback.
-
@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
Method used:
Any suggestion ? |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
You may want to contact private support at https://support.github.com/contact then so that we can take a deeper look at your configuration and exactly what parameters you’re passing to the API calls. |
Beta Was this translation helpful? Give feedback.
-
sure @lee-dohm . Will do. Thanks again :slight_smile: |
Beta Was this translation helpful? Give feedback.
Thanks for reaching out.
Here’s my understanding of the Checks flow from the documentation:
check_suite
webhook event to your GitHub AppWhat 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 …