You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@cypress/github-commit-status-check

Package Overview
Dependencies
Maintainers
11
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cypress/github-commit-status-check

Set GitHub commit status

1.5.0
latest
Source
npmnpm
Version published
Weekly downloads
483
25.78%
Maintainers
11
Weekly downloads
 
Created
Source

@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

FAQs

Package last updated on 03 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts