Giter Club home page Giter Club logo

github-contribs's Introduction

Build Status Coverage Status npm version All Contributors

github-contribs

List all GitHub repos a user has contributed to since the beginning of time:

  • not just the last few months,
  • not just the repos owned by the user or their organisations,
  • simply all repos a user has ever pushed to.
$ github-contribs AurelienLourot
✔ Fetched first day at GitHub: 2015-04-04.
⚠ Be patient. The whole process might take up to an hour... Consider using --since and/or --until
✔ Fetched all commits and PRs. Consider using --issues to fetch issues as well.
35 repo(s) found:
AurelienLourot/lsankidb
reframejs/reframe
dracula/gitk
...

Advanced usage

Installation

$ sudo npm install -g @ghuser/github-contribs

Contributing

To the code

To run your local changes:

$ yarn install
$ ./cli.js --help

Contributors

Thanks goes to these wonderful people (emoji key):


Aurelien Lourot

💬 💻 📖

John Vandenberg

🐛 🤔

Jeaye Wilkerson

🐛

Hagar Shilo

🤔

Romuald Brillout

🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

NOTE: if you should be on the list of contributors but we forgot you, don't be shy and let us know!

FAQ

How does it work?

Normally in order to retrieve all repositories a user has interacted with, one should query the GitHub Events API. Unfortunately it returns only the last 90 days, so we don't use it.

Instead we noticed that the "Contribution Activity" section's content on the profile pages comes from URLs like https://github.com/AurelienLourot?from=2018-10-09 .

So we're fetching these URLs too and parsing their output.

Why is it so slow?

We hit a rate limit. And since it's not an official API, we can't use a token to raise the limit.

NOTE: the rate limit seems to be 40 requests / minute / endpoint / IP. Thus even if crawling a single user takes about 3 hours on a single machine, crawling many users in parallel on that same machine should still take about 3 hours.

Isn't it likely to break?

Yes, it is since that interface isn't public. We're monitoring it1 and will react as fast as we can when it breaks.

1 ghuser.io runs this tool every day.

github-contribs missed some of my commits. Why?

github-contribs can only discover commits considered as GitHub contributions, i.e. commits that would also appear in the activity section of your GitHub profile. For example it doesn't discover commits in forks.

Changelog

2.2.4 (2018-11-11):

2.2.3 (2018-10-20):

2.2.2 (2018-10-13):

2.2.1 (2018-09-15):

  • Documentation improvements.

2.2.0 (2018-08-09):

  • #1 - Added --issues flag.

2.1.0 (2018-06-25):

  • Exported helper function prevDay().

2.0.0 (2018-06-25):

  • Exported helper functions stringToDate() and dateToString().

1.0.0 (2018-06-11):

  • Support for passing a GitHub API key.

0.0.2 (2018-05-29):

  • Cosmetic improvements to the npm page.

0.0.1 (2018-05-29):

  • Initial version.

Similar/Related projects

  • GitHub-contributions: uses a different technique. It fetches all the user's pull requests from the official API. This is clever but will miss the repos to which the user has pushed directly without pull request.
  • gharchive.org: records all GitHub events for all users. In theory it should be possible to replace our implementation by queries to this huge database.

github-contribs's People

Contributors

lourot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

github-contribs's Issues

Stuck at 3698/3701

I'm on mobile atm, so perhaps shouldnt have been so ambitious, and dont want to retry atm.
It has been stuck at this point for more than 30 mins, so I guess that means it isnt working.

$ ./cli.js jayvdb --issues
✔ Fetched first day at GitHub: 2008-06-26.
⚠ Be patient. The whole process might take up to 4 hours... Consider using --since and/or --until
⠧ Fetching all commits, PRs and issues [3698/3701]

Problems with approach

Using the created_commits undocumented API means it does not capture activity unless the user has met the criteria for the commits to appear on their profile.

https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/#commits

This can mean many commits are omitted.

e.g. I suspect that all commits in https://github.com/coala/gh-board will be omitted due to the top set of rules.

Also @wikimedia committers will have most of their commits omitted because they are done in gerrit and sync'd to GitHub, and they would need to star the relevant repos for those commtis to be included.

Some extra documentation in the README or elsewhere would be appropriate.

Perhaps this tool doesnt want to solve this problem, and that is ok.

Issue creation as a contribution

The Github profile page also takes into account issue creation as part of the contributions, but it seems github-contribs does not. Is there any reason why this wasn't included? Can it be added?

CLI should save data

After the CLI was doing such a lot of data fetching/collation/processing, I was expecting it to dump a json file or similar to disk.

A list of repos isnt very rewarding for all that work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.