Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-core-utils

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-core-utils

Utilities for Node.js core collaborators

  • 1.5.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.3K
increased by6.55%
Maintainers
1
Weekly downloads
 
Created
Source

Node.js Core Utilities

npm Build Status codecov Known Vulnerabilities

CLI tools for Node.js Core collaborators.

Usage

npm install -g node-core-utils

After running any of the tools for the first-time, you will be asked to provide a GitHub username and password in order to create a personal access token.

If you prefer not to provide your login credentials, follow these instructions to create the token.

Note: We need to read the email of the PR author in order to check if it matches the email of the commit author. This requires checking the box user:email when you create the personal access token (you can edit the permission later as well).

Then create a file named .ncurc under your $HOME directory (~/.ncurc);

{
  "username": "you_github_username"
  "token": "token_that_you_created"
}

If you would prefer to build from the source, install and link:

git clone git@github.com:joyeecheung/node-core-utils.git
cd node-core-utils
npm install
npm link

get-metadata

This one is inspired by Evan Lucas's node-review , although it is a CLI implemented with the Github GraphQL API.

get-metadata <identifier> [owner] [repo]

Retrieves metadata for a PR and validates them against nodejs/node PR rules

Options:
  --version    Show version number                                     [boolean]
  -o, --owner  GitHub owner of the PR repository                        [string]
  -r, --repo   GitHub repository of the PR                              [string]
  -h, --help   Show help                                               [boolean]

Examples:

PRID=12345

# fetch metadata and run checks on nodejs/node/pull/$PRID
$ get-metadata $PRID
# is equivalent to
$ get-metadata https://github.com/nodejs/node/pull/$PRID
# is equivalent to
$ get-metadata $PRID -o nodejs -r node

# Or, redirect the metadata to a file while see the checks in stderr
$ get-metadata $PRID > msg.txt

# Using it to amend commit messages:
$ git show -s --format=%B > msg.txt
$ echo "" >> msg.txt
$ get-metadata $PRID >> msg.txt
$ git commit --amend -F msg.txt

Features

  • Generate PR-URL
  • Generate Reviewed-By
  • Generate Fixes
  • Generate Refs
  • Check for CI runs
  • Check if commiters match authors
  • Check 48-hour wait
  • Check two TSC approval for semver-major
  • Warn new commits after reviews
  • Check number of files changed (request pre-backport)

Contributing

See CONTRIBUTING.md.

License

MIT. See LICENSE.

FAQs

Package last updated on 05 Nov 2017

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