DEV Community

Discussion on: Comparing OSS on GitHub

Collapse
 
rhymes profile image
rhymes

Hi Uechi, seems very neat tool to gather statistics on repositories, well done!

just a few things:

  • if you just call gh-compare or gh-compare --help you get this:
✖ Something went wrong: TypeError: Cannot convert undefined or null to object
✖ Generating comparison
  • if you call with just one repository you get this:
ℹ Compared to 1 repositories
┌──────────┬────────────────┐
│ fullname │ facebook/react │
├──────────┼────────────────┤
│ language │ JavaScript     │
├──────────┼────────────────┤
│ created  │ over 5 years   │
├──────────┼────────────────┤
│ updated  │ about 10 hours │
├──────────┼────────────────┤
│ stars    │ 110205         │
├──────────┼────────────────┤
│ watches  │ 6283           │
├──────────┼────────────────┤
│ forks    │ 19659          │
├──────────┼────────────────┤
│ issues   │ 349            │
├──────────┼────────────────┤
│ size     │ 134.66MB       │
├──────────┼────────────────┤
│ owner    │ Organization   │
└──────────┴────────────────┘
✔ Generating comparison

1 repositories should probably be 1 repository

  • if you call it with duplicates, it lists the duplicates twice:
ℹ Compared to 3 repositories
┌──────────┬────────────────┬─────────────────┬─────────────────┐
│ fullname │ facebook/react │ angular/angular │ angular/angular │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ language │ JavaScript     │ TypeScript      │ TypeScript      │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ created  │ over 5 years   │ almost 4 years  │ almost 4 years  │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ updated  │ about 10 hours │ about 17 hours  │ about 17 hours  │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ stars    │ 110205         │ 40163           │ 40163           │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ watches  │ 6283           │ 3193            │ 3193            │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ forks    │ 19659          │ 9808            │ 9808            │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ issues   │ 349            │ 2470            │ 2470            │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ size     │ 134.66MB       │ 83.52MB         │ 83.52MB         │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ owner    │ Organization   │ Organization    │ Organization    │
└──────────┴────────────────┴─────────────────┴─────────────────┘
✔ Generating comparison

maybe you want to deduplicate so to have only 2 repos, not 3

  • finally, if one of the repos doesn't exist the tool breaks, like gh-compare facebook/react angular/anguasd:
✖ Something went wrong: TypeError: Cannot read property 'type' of undefined
✖ Generating comparison

Hope this is helpful!

Collapse
 
uetchy profile image
uetchy

Thank you for the thoughtful feedback! It helped me so much :)
I've just updated gh-compare to cover these issues.

You can update gh-compare via npm install -g gh-compare@1.1.0.

Collapse
 
rhymes profile image
rhymes

ahahha that was quick :-D

well done!