New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

create-check

Package Overview
Dependencies
Maintainers
1
Versions
589
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-check

Create a GitHub check + annotation.

  • 0.6.40
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.3K
increased by4%
Maintainers
1
Weekly downloads
 
Created
Source

create-check

Create a GitHub check with annotations on a PR

Highlights

  • Detects PR number and creates check w/annotations
  • Does nothing locally
  • Only runs in CI environment

Install

npm install --save-dev create-check
# or
yarn add -D create-check

Usage

Everything is written in typescript with JSDOC comments so your editor should tell you what each option is and does.

import createCheck from 'create-check';

async function main() {
  await createCheck({
    tool: 'stylelint',
    name: 'Check Styles for Errors',
    annotations: createAnnotations(results),
    errorCount,
    warningCount,
    appId: APP_ID,
    privateKey: PRIVATE_KEY,
  });

  console.log('Created check on PR');
}

main();

Changing GitHub URL (enterprise)

To get this package to work on github enterprise instances you will need to set the GH_API or GITHUB_URL environment variable to a url pointing towards your enterprise GitHub's API.

You may also need custom previews for some apis to work. Set the GH_PREVIEWS variable to a comma separated list of previews you'd like enabled.

Example:

GH_PREVIEWS=eye-scream-preview,machine-man-preview

Env Vars

This library will detect all the data it needs from the env, but sometimes a CI doesn't expose everything. The following env vars can be set:

  • REPO
  • OWNER
  • stylelint-formatter-github - See stylelint errors and warnings directly in pull requests
  • eslint-formatter-github - See eslint errors and warnings directly in pull requests
  • jest-github-reporter - Report jest test errors directly in pull requests

Keywords

FAQs

Package last updated on 13 Feb 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc