Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running git node metadata in nodejs/citgm #205

Closed
gibfahn opened this issue Mar 7, 2018 · 4 comments
Closed

Running git node metadata in nodejs/citgm #205

gibfahn opened this issue Mar 7, 2018 · 4 comments
Labels
enhancement Things that enhances functionality, provided by node-core-utils pr-checker Issues related to pr checker stale

Comments

@gibfahn
Copy link
Member

gibfahn commented Mar 7, 2018

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).

@priyank-p priyank-p added enhancement Things that enhances functionality, provided by node-core-utils pr-checker Issues related to pr checker labels Mar 8, 2018
@priyank-p
Copy link
Contributor

For 1), we do need to fix strictly checking for TSC in the readme probably should only check if the repo is node.

Second question is why it fails with this error:

Probably because it couldn't find TSC members (I am not entirely sure though).

Third question is what are the steps you go through to set a repo up to be used with git node metadata?

It is documented in docs/git-node here

@joyeecheung
Copy link
Member

joyeecheung commented Mar 8, 2018

I've actually got a local branch that fixes this ( since I sometimes use git-node to land PR of llnode). We just need to add a readme config so the README is read from a local file instead of being fetched from remote every time.

@github-actions
Copy link
Contributor

This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.

@github-actions github-actions bot added the stale label Aug 17, 2020
@priyank-p
Copy link
Contributor

Closing under the assumption that #223 fixes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Things that enhances functionality, provided by node-core-utils pr-checker Issues related to pr checker stale
Projects
None yet
Development

No branches or pull requests

3 participants