Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I remove a GitHub status check?

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?

like image 476
jameslafferty Avatar asked Jan 05 '18 03:01

jameslafferty


People also ask

How do I edit a GitHub check?

Navigate to the Settings page of your GitHub repository. In the left-hand menu, click Branches . Under Branch protection rules , either click Edit for a rule that you would like to change, or click Add rule at the top to create a new rule.

What is GitHub status check?

You can see the overall state of the last commit to a branch on your repository's branches page or in your repository's list of pull requests. If status checks are required for a repository, the required status checks must pass before you can merge your branch into the protected branch.

What is GitHub commit status?

The Commit status API allows external services to mark commits with an error , failure , pending , or success state, which is then reflected in pull requests involving those commits.


2 Answers

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! > 
like image 157
indigobuffalo Avatar answered Sep 20 '22 18:09

indigobuffalo


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.

like image 31
VonC Avatar answered Sep 23 '22 18:09

VonC