Skip to content

Commit 0405039

Browse files
committedFeb 23, 2018
docs: deprecate get-metadata -> git node metadata
1 parent a6a20f7 commit 0405039

File tree

3 files changed

+41
-70
lines changed

3 files changed

+41
-70
lines changed
 

‎README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ CLI tools for Node.js Core collaborators.
2121

2222
## Tools
2323

24-
- [`get-metadata`](./docs/get-metadata.md): Retrieving metadata for a Pull Request.
2524
- [`git-node`](./docs/git-node.md): Custom Git commands for working with Node.js
2625
core, e.g. landing Pull Requests.
2726
- [`ncu-config`](./docs/ncu-config.md): Configure variables for node-core-utils
2827
to use.
2928
- [`ncu-team`](./docs/ncu-team.md): Listing members of a team, synchronizing
3029
special blocks in files with the list of members.
30+
- [`get-metadata`](./docs/get-metadata.md): Retrieving metadata for a Pull Request.
31+
**DEPRECATED**: use [`git node metadata`](./docs/git-node.md#git-node-metadata)
32+
instead.
3133

3234
## Usage
3335

‎docs/get-metadata.md

+2-58
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,4 @@
11
# get-metadata
22

3-
This tool is inspired by Evan Lucas's [node-review](https://github.com/evanlucas/node-review),
4-
although it is a CLI implemented with the GitHub GraphQL API.
5-
6-
```
7-
get-metadata <identifier>
8-
9-
Retrieves metadata for a PR and validates them against nodejs/node PR rules
10-
11-
Options:
12-
--version Show version number [boolean]
13-
--owner, -o GitHub owner of the PR repository [string]
14-
--repo, -r GitHub repository of the PR [string]
15-
--file, -f File to write the metadata in [string]
16-
--check-comments Check for 'LGTM' in comments [boolean]
17-
--max-commits Number of commits to warn [number] [default: 3]
18-
--help, -h Show help [boolean]
19-
```
20-
21-
Examples:
22-
23-
```bash
24-
PRID=12345
25-
26-
# fetch metadata and run checks on nodejs/node/pull/$PRID
27-
$ get-metadata $PRID
28-
# is equivalent to
29-
$ get-metadata https://github.com/nodejs/node/pull/$PRID
30-
# is equivalent to
31-
$ get-metadata $PRID -o nodejs -r node
32-
33-
# Or, redirect the metadata to a file while see the checks in stderr
34-
$ get-metadata $PRID > msg.txt
35-
36-
# Using it to amend commit messages:
37-
$ get-metadata $PRID -f msg.txt
38-
$ echo -e "$(git show -s --format=%B)\n\n$(cat msg.txt)" > msg.txt
39-
$ git commit --amend -F msg.txt
40-
```
41-
42-
### Git bash for Windows
43-
If you are using `git bash` and having trouble with output use `winpty get-metadata.cmd $PRID`.
44-
45-
current known issues with git bash:
46-
- git bash Lacks colors.
47-
- git bash output duplicates metadata.
48-
49-
### Features
50-
51-
- [x] Generate `PR-URL`
52-
- [x] Generate `Reviewed-By`
53-
- [x] Generate `Fixes`
54-
- [x] Generate `Refs`
55-
- [x] Check for CI runs
56-
- [x] Check if committers match authors
57-
- [x] Check 48-hour wait
58-
- [x] Check two TSC approval for semver-major
59-
- [x] Warn new commits after reviews
60-
- [ ] Check number of files changed (request pre-backport)
3+
This tool is deprecated and is currently an alias to
4+
[`git node metadata`](./git-node.md#git-node-metadata)

‎docs/git-node.md

+36-11
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ Examples:
8787

8888
### `git node metadata`
8989

90+
This tool is inspired by Evan Lucas's [node-review](https://github.com/evanlucas/node-review),
91+
although it is a CLI implemented with the GitHub GraphQL API.
92+
9093
```
9194
git-node metadata <identifier>
9295
@@ -104,16 +107,38 @@ Options:
104107
--readme Path to file that contains collaborator contacts [string]
105108
--check-comments Check for 'LGTM' in comments [boolean]
106109
--max-commits Number of commits to warn [number] [default: 3]
110+
```
107111

108112
Examples:
109-
git node metadata 12344 Retrieve the metadata of
110-
https://github.com/nodejs/node/pull/12344
111-
and validate the PR
112-
git node metadata Retrieve the metadata of
113-
https://github.com/nodejs/node/pull/12344 https://github.com/nodejs/node/pull/12344
114-
and validate it
115-
git node metadata 167 --repo llnode --readme Retrieve the metadata of
116-
../node/README.md https://github.com/nodejs/llnode/pull/167
117-
and validate it using the README in
118-
../node/README.md
119-
```
113+
114+
```bash
115+
PRID=12345
116+
117+
# fetch metadata and run checks on nodejs/node/pull/$PRID
118+
$ git node metadata $PRID
119+
# is equivalent to
120+
$ git node metadata https://github.com/nodejs/node/pull/$PRID
121+
# is equivalent to
122+
$ git node metadata $PRID -o nodejs -r node
123+
124+
# Or, redirect the metadata to a file while see the checks in stderr
125+
$ git node metadata $PRID > msg.txt
126+
127+
# Using it to amend commit messages:
128+
$ git node metadata $PRID -f msg.txt
129+
$ echo -e "$(git show -s --format=%B)\n\n$(cat msg.txt)" > msg.txt
130+
$ git commit --amend -F msg.txt
131+
132+
# fetch metadata and run checks on https://github.com/nodejs/llnode/pull/167
133+
# using the contact in ../node/README.md
134+
git node metadata 167 --repo llnode --readme ../node/README.md
135+
```
136+
137+
#### Git bash for Windows
138+
139+
If you are using `git bash` and having trouble with output use
140+
`winpty git-node.cmd metadata $PRID`.
141+
142+
current known issues with git bash:
143+
- git bash Lacks colors.
144+
- git bash output duplicates metadata.

0 commit comments

Comments
 (0)
Please sign in to comment.