GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nodejs/node-core-utils: CLI tools for Node.js Core collaborators

BranchesTags
Open more actions menu

Latest commit

 

History

1,023 Commits
1,023 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
bin
bin
 
 
components
components
 
 
docs
docs
 
 
lib
lib
 
 
test
test
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.npmrc
.npmrc
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
eslint.config.js
eslint.config.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

Node.js Core Utilities

npm Build Status codecov Known Vulnerabilities

CLI tools for Node.js Core collaborators.

  • Tools
  • Usage
    • Install
    • Setting up GitHub credentials
    • Setting up Jenkins credentials
    • Make sure your credentials won't be committed
    • Shell autocomplete
    • Troubleshooting
  • Contributing
  • License

Tools

  • git-node: Custom Git commands for working with Node.js core, e.g. landing Pull Requests.
  • ncu-config: Configure variables for node-core-utils to use.
  • ncu-team: Listing members of a team, synchronizing special blocks in files with the list of members.
  • ncu-ci: Parse the results of a Jenkins CI run and display a summary for all the failures.

Usage

Install

npm install -g @node-core/utils

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

git clone [email protected]:nodejs/node-core-utils.git
cd node-core-utils
npm ci
npm link

Setting up GitHub credentials

Most of the tools need your GitHub credentials to work. You can either

  1. Run any of the tools and you will be asked in a prompt to provide your username and password in order to create a personal access token.
  2. Or, create a personal access token yourself on GitHub, then set them up using an editor.

If you prefer option 2, follow these instructions to create the token.

When creating the token, the following boxes need to be checked:

  • user:email: Used by git-node to read the email of the PR author in order to check if it matches the email of the commit author.
  • read:org: Used by ncu-team to read the list of team members.

Optionally, if you want to grant write access so git-node can write comments:

  • public_repo (or repo if you intend to work with private repositories).

You can also edit the permission of existing tokens later.

After the token is generated, you can give it to NCU using:

With encryption (Recommended)
ncu-config set username your_github_username
# Do not provide the token in the CLI, `ncu-config` will prompt you for it.
ncu-config set -x token

Note: Encryption is available only if you have gpg setup on your machine.

Without encryption
ncu-config set username your_github_username
# Do not provide the token in the CLI, `ncu-config` will prompt you for it.
ncu-config set token

Setting up Jenkins credentials

The git-node and ncu-ci commands need to query the Node.js Jenkins API for CI results, so you'll need to configure the Jenkins API token before using these commands.

To obtain the Jenkins API token

  1. Open https://ci.nodejs.org/user/<your-github-username>/security (replace <your-github-username> with your own GitHub username).

  2. Click on the ADD NEW TOKEN button in the API Token section.

  3. Enter an identifiable name (for example, node-core-utils) for this token in the inbox that appears, and click GENERATE.

  4. Copy the generated token.

  5. Add it into your ncurc file (~/.ncurc or $XDG_CONFIG_HOME/ncurc, or ~/.ncurc.gpg or $XDG_CONFIG_HOME/ncurc.gpg) with jenkins_token as key, like this:

    With encryption (recommended)
    ncu-config set -x jenkins_token

    Note: Encryption is available only if you have gpg setup on your machine.

    Without encryption
    ncu-config set jenkins_token

Protecting your credentials

Put the following entries into your global gitignore file ($XDG_CONFIG_HOME/git/ignore or a file specified by core.excludesFile). For example:

$ git config --global core.excludesfile ~/.gitignore_global
# In ~/.gitignore_global
# node-core-utils configuration file
.ncurc
.ncurc.gpg
# node-core-utils working directory
.ncu

Mind that .ncu/land could contain your access token since it contains the serialized configurations.

If you ever accidentally commit your access token on GitHub, you can simply revoke that token and use a new one.

Shell autocomplete

To add autocomplete just run git-node completion and follow the instructions. (same for the rest of the tools)

Troubleshooting

If you encounter an error that you cannot fix by yourself, please

  1. Make sure you update NCU to the latest version
  2. Try again with the NCU_VERBOSITY=debug environment variable set and open an issue at https://github.com/nodejs/node-core-utils/issues with detailed logs.

Contributing

See CONTRIBUTING.md.

License

MIT. See LICENSE.

About

CLI tools for Node.js Core collaborators

nodejs.github.io/node-core-utils/

Topics

nodenodejs

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

317 stars

Watchers

15 watching

Forks

139 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.