-
Notifications
You must be signed in to change notification settings - Fork 121
Description
So I thought I'd try to get the metadata for CitGM. Didn't expect it to work out of the box, but I thought I'd raise this to document the issues I hit.
▶▶▶ npm i -g node-core-utils@latest ~/wrk/com/DANGER/citgm (name-tags)
/usr/local/bin/get-metadata -> /usr/local/lib/node_modules/node-core-utils/bin/get-metadata
/usr/local/bin/ncu-config -> /usr/local/lib/node_modules/node-core-utils/bin/ncu-config
/usr/local/bin/ncu-team -> /usr/local/lib/node_modules/node-core-utils/bin/ncu-team
/usr/local/bin/git-node -> /usr/local/lib/node_modules/node-core-utils/bin/git-node
npm WARN You are using a pre-release version of node and things may not work as expected
+ node-core-utils@1.11.1
added 153 packages and updated 2 packages in 22.411s
▶▶▶ get-metadata https://github.com/nodejs/citgm/pull/555 ~/wrk/com/DANGER/citgm 23s (name-tags)
✖ Getting commits from nodejs/citgm/pull/555
✖ Couldn't find ### TSC (Technical Steering Committee) in the README
Error: Couldn't find ### TSC (Technical Steering Committee) in the README
at getCollaborators (/usr/local/lib/node_modules/node-core-utils/lib/collaborators.js:56:11)
at PRData.getCollaborators (/usr/local/lib/node_modules/node-core-utils/lib/pr_data.js:73:26)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:95:7)
git-node metadata <identifier>
Retrieves metadata for a PR and validates them against nodejs/node PR rules
Positionals:
identifier ID or URL of the pull request [string] [required]
Options:
--version Show version number [boolean]
--help Show help [boolean]
--owner, -o GitHub owner of the PR repository [string] [default: "nodejs"]
--repo, -r GitHub repository of the PR [string] [default: "node"]
--file, -f File to write the metadata in [string]
--readme Path to file that contains collaborator contacts [string]
--check-comments Check for 'LGTM' in comments [boolean]
--max-commits Number of commits to warn [number] [default: 3]
Examples:
git node metadata 12344 Retrieve the metadata of
https://github.com/nodejs/node/pull/12344
and validate the PR
git node metadata Retrieve the metadata of
https://github.com/nodejs/node/pull/12344 https://github.com/nodejs/node/pull/12344
and validate it
git node metadata 167 --repo llnode --readme Retrieve the metadata of
../node/README.md https://github.com/nodejs/llnode/pull/167
and validate it using the README in
../node/README.md
TypeError: Cannot read property 'replace' of undefined
at CLI.error (/usr/local/lib/node_modules/node-core-utils/lib/cli.js:130:52)
at getMetadata.catch (/usr/local/lib/node_modules/node-core-utils/components/git/metadata.js:92:9)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:95:7)✖ Couldn't find ### TSC (Technical Steering Committee) in the README
First issue is reasonably easy to understand, we need to put our collaborators in the README so that git node metadata can pick them up.
But why is it looking for the TSC?
Second question is why it fails with this error:
TypeError: Cannot read property 'replace' of undefined
Third question is what are the steps you go through to set a repo up to be used with git node metadata?
If they could be written down somewhere (probably an md file in docs that links to https://github.com/nodejs/node-core-utils/tree/master/docs/ncu-team.md a lot) then we could link to that when we can't get the metadata (e.g. in this case).