| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Github has neat statistics for contributors, it shows number of commits and nice charts. But people contribute to Github projects not only via commits. Actually, a lot of contributions happens in issue or pull request comments 💬. Github doesn't have statistics to show "top commenters". We think those people also deserve recognition.
You would need to fetch all existing comments for a given repository for a given period or till the API limit is exhausted, group by user and output it sorted by number of comments. Here is how we will execute your program and how output should look like:
node index.js --repo anton/test-project --period 20d
Fetching comments for past 20 days for "anton/test-project"...
< your progress indicator here >
3012 comments, michael.davidovich (20 commits)
1345 comments, graymur (2104 commits)
8 comments, Restuta (234 commits) Please use the exact output format, notice that numbers are aligned (this is what famous left-pad is for). Also it's up to you how to indicate progress of the fetching process, but there must be some indicator.
Fortunately Github has a great HTTP API to help with the task. There are 3 types of comments a person can make, comment on individual commit, comment in Issue/Pull Request or comment in Pull Request review. (You can read more in their docs, if you are curious, but it's not required for this task.)
Mentioned 3 types of comments can be accessed using the following API endpoints:
You probably noticed in a sample output that after each name there is number of commits, here is an API to help fetch that:
Use "total", we don't care for commits to match a date range, we just want all of them.
We provide a basic project setup, so you don't have to worry about setting up our environment. You would need to obtain and use your personal access token.
Create personal access token, save it, and then use it to access API to get 5000 requests/hour.
To get started:
module.exports = '<token>'Your github token is:
<your token>
<details of your github account>You can remove this entry code afterwards. Mentioned file is added to .gitignore already.
Run npm run eslint:fix and fix all issues. Commit and push those fixes. Email us a link to your fork.
| Back | FazBrowse Home | New Git URL |