@@ -87,6 +87,9 @@ Examples:
87
87
88
88
### ` git node metadata `
89
89
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
+
90
93
```
91
94
git-node metadata <identifier>
92
95
@@ -104,16 +107,38 @@ Options:
104
107
--readme Path to file that contains collaborator contacts [string]
105
108
--check-comments Check for 'LGTM' in comments [boolean]
106
109
--max-commits Number of commits to warn [number] [default: 3]
110
+ ```
107
111
108
112
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