Skip to content

Commit 03679c0

Browse files
committedFeb 13, 2018
git-node: add core-validate-commit to dependencies
This removes an install step by directly depending on the dependency instead of asking the user to install it separately. Fixes: nodejs/node-core-utils#177
1 parent 9d97804 commit 03679c0

File tree

4 files changed

+78
-16
lines changed

4 files changed

+78
-16
lines changed
 

‎docs/git-node.md

+10-15
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,16 @@ A custom Git command for managing pull requests. You can run it as
66
### Prerequistes
77

88
1. It's a Git command, so make sure you have Git installed, of course.
9-
2. Install [core-validate-commit](https://github.com/nodejs/core-validate-commit)
10-
11-
```
12-
$ npm install -g core-validate-commit
13-
```
14-
3. Configure your upstream remote and branch name. By default it assumes your
15-
remote pointing to https://github.com/nodejs/node is called `upstream`, and
16-
the branch that you are trying to land PRs on is `master`. If that's not the
17-
case:
18-
19-
```
20-
$ cd path/to/node/project
21-
$ ncu-config set upstream your-remote-name
22-
$ ncu-config set branch your-branch-name
23-
```
9+
1. Configure your upstream remote and branch name. By default it assumes your
10+
remote pointing to https://github.com/nodejs/node is called `upstream`, and
11+
the branch that you are trying to land PRs on is `master`. If that's not the
12+
case:
13+
14+
```
15+
$ cd path/to/node/project
16+
$ ncu-config set upstream your-remote-name
17+
$ ncu-config set branch your-branch-name
18+
```
2419

2520
### Demo & Usage
2621

‎lib/landing_session.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class LandingSession extends Session {
159159
const branch = this.branch;
160160
const notYetPushed = this.getNotYetPushedCommits();
161161
const notYetPushedVerbose = this.getNotYetPushedCommits(true);
162-
await runAsync('core-validate-commit', notYetPushed);
162+
await runAsync('npx', ['core-validate-commit', ...notYetPushed]);
163163

164164
cli.separator();
165165
cli.log('The following commits are ready to be pushed to ' +

‎package-lock.json

+66
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"license": "MIT",
3333
"dependencies": {
3434
"chalk": "^2.2.0",
35+
"core-validate-commit": "^3.5.0",
3536
"figures": "^2.0.0",
3637
"ghauth": "^3.2.1",
3738
"jsdom": "^11.3.0",

0 commit comments

Comments
 (0)
Please sign in to comment.