An API to update GitHub Checks quickly with no dependencies
npm install github-checksgithub-checks is a small CLI tool to create and update check runs for commits on GitHub. It is designed to be used in CI/CD pipelines.
This tool uses the GitHub Check Runs REST API.
``bash`
npm install -g github-checks
Alternatively, you can use npx to run the CLI without installing it:
`bash`
npx github-checks ...
There are 2 commands available:
- create - Create a new check runupdate
- - Update an existing check run
1. Create a new check run
`bash`
npx github-checks create --accessToken=
`bash`
npx github-checks create --accessToken=
This command returns the checkRunId that you can use to update the check run:

Refer to the Error Handling section for details on failure behavior.
2. Update an existing check run
`bash`
npx github-checks update --accessToken=
`bash`
npx github-checks update --accessToken=
If successful, the command will return the updated check run and return success in the terminal:

Refer to the Error Handling section for details on failure behavior.
Alternatively, you can just set the environment variables for the following parameters:
- GITHUB_ACCESS_TOKEN=OWNER=
- REPO=
- HEAD_SHA=
-
These environment variables will be used as default values for the CLI arguments. You can still override them by passing the arguments.
On failure, the CLI throws an error and exits with the status code 1.
If the request fails, the CLI will retry the request up to 3` times before failing.
A detailed documentation will be available soon.