How do I remove a GitHub status check?
11,531
Solution 1
I see the GitHub API V3 Repository Statuses (for github.com or for a private GitHub enterprise instance) includes:
- Create a status
- List statuses for a specific ref
- Get the combined status for a specific ref
There is no deletion as far as I can see.
Solution 2
Like @VonC I couldn't find a deletion option. However, you can disable any existing checks so that they no longer run on your PRs.
Settings
Branches
Branch protection rules
Edit (next to your desired branch, e.g. 'master')
Rule settings
Require status checks to pass before merging
Require branches to be up to date before merging
< Uncheck any statuses you want to disable! >
Related videos on Youtube
Author by
jameslafferty
I'm a senior front end web engineer at Workday. Avocados, Shakespeare and Farscape are examples of some things I think are cool. In the past, I've taught PHP, JavaScript and Angular. These days I code a lot of Typescript/React and occasionally mess up some Java.
Updated on June 04, 2022Comments
-
jameslafferty almost 2 years
I have a GitHub status check generated by TeamCity, and I'm trying to delete it (not just disable it).
I've tried (line breaks added for readability):
curl -u <myusername>:<mytoken> -X DELETE https://:github_instance/api/v3/repos/:user/:repo/statuses/:hash
I got the url from:
curl -u <myusername>:<mytoken> https://:github_instance/api/v3/repos/:user/:repo/statuses/:branch_name
Am I missing something?
-
gabel about 5 yearsYou can overwrite a status by name. See webapps.stackexchange.com/a/78518 for a working solution
-
Diego Pamio about 5 yearsHaving the same issue.
-
jameslafferty over 4 years@gabel overwriting does not a delete make though, does it? It'd be cleaner if an actual delete were possible, no?
-
gabel over 4 years@jameslafferty No it doesn't but as you can overwrite the context you could do something like.. PROCESS-A: pending --- overwrite it with CANCELED: successful
-
-
jameslafferty over 6 yearsYeah, I didn't see anything there either. Was hoping someone knew something beyond the documentation. Le sigh. I'll keep on holding my breath for a solution, but you get my upvote.
-
jameslafferty over 6 yearsBoo! It looks like this is the actual answer, which is lame. But points to @VonC!
-
VonC over 5 yearsInteresting alternative. +1
-
jameslafferty over 5 yearsI'll vote this up, as folks might find it useful. I still think @VonC's answer remains correct. It'd be nice if GitHub provided a real solution.
-
Ian Paschal about 5 yearsThis does not actually remove the status check from running, only from preventing a failed status check from blocking a merge.
-
zzz over 4 yearsUnfortunately, this solution now returns a "Rule is invalid" error when trying to enable it.
-
phillipuniverse over 4 years> Unfortunately, this solution now returns a "Rule is invalid" error when trying to enable it. You must specify a branch pattern so just put *