Create/update check-runs via GitHub API using a personal token

Hi,

Is it possible to create/update a check using the GitHub API and a personal token?

My tests for now lead to the following response:

{
  "message": "You must authenticate via a GitHub App.",
  "documentation_url": "https://developer.github.com/v3/checks/runs/#create-a-check-run"
}
3 Likes

Hi @cchantep,

Thanks for being here! Not without an app.

However, you could try leveraging GitHub Actions. 

The GITHUB_TOKEN provided in GitHub Actions: https://developer.github.com/actions/managing-workflows/storing-secrets/#github-token-secret has read/write permission on the Checks API: https://developer.github.com/v3/apps/permissions/#permission-on-checks. You must specify the token in your workflow in the secrets array:

2 Likes

Thanks for the answers, but unfortunately I don’t want/cannot create an app or action just to have a token allowed to use check API, it was planed to be done from a script.

I also wonder, how I can test it manually before using in actions workflow. Using it right away in the workflow is not convenient, since it takes time.

BTW, documentation says, I can use PAT whenever I use API.
Please point in the right place if I missed something, but it does not say about any exceptions.

1 Like

Hey @RunsFor :wave:

Unfortunately, as far as I’m aware, the Checks API is explicitly available via GitHub Application, and not directly via curl with a PAT:

The Checks API functionality is available exclusively to your GitHub Apps.

So as it stands, a GitHub App is the only way to leverage the Checks API. Due to this, I would highly suggest submitting feedback via this form:

…which gets submitted directly to our PMs for review.

If there are any questions about using the Checks API within its current form, please let us know! :bow:

1 Like

Thanks for clarifications! I will use your suggestion about writing to a support channel.

1 Like

That sucks. I’ve been waiting for this for over 1.5 years and still it isn’t possible to create checks using normal API. Why not?