@cypress/github-commit-status-check
TypeScript icon, indicating that this package has built-in type declarations

1.5.0 • Public • Published

@cypress/github-commit-status-check

Small utility for setting GitHub commit status based on GH app installation

This utility is meant to be used by GitHub App installations. Thus your environment should have the following 3 pieces of authentication information set as environment variables:

  • GH_APP_ID
  • GH_INSTALLATION_ID
  • GH_PRIVATE_KEY

The GH_PRIVATE_KEY is the base64-encoded private key. For example, if you copy the contents of the private "pem" file into your clipboard, from the terminal you can execute "pbpaste | base64 | pbcopy" and get the encoded string in the clipboard.

As always, for local use I recommend as-a utility.

Use

Primary use via module API, see src/index.ts

Setting commit check

import { setCommitStatus } from '@cypress/github-commit-status-check'
await setCommitStatus({
  // bunch of options
})

There is a bin script src/bin/set-commit-status.ts that reads options from command line arguments. For example, if environment variables are stored under block set-status in your as-a settings, then:

$ as-a set-status npm run set-commit-status -- --repo ...

Adding comment to a commit

$ as-a set-status npm run add-commit-comment -- --repo ...

Debugging

Run with environment variable DEBUG=@cypress/github-commit-status-check to see more log messages

Readme

Keywords

none

Package Sidebar

Install

npm i @cypress/github-commit-status-check

Weekly Downloads

11

Version

1.5.0

License

ISC

Unpacked Size

26.3 kB

Total Files

14

Last publish

Collaborators

  • cypress-npm-publisher