https://github.com/ajwad-shaikh/gitstat
An API that serves the ✨ top ✨ forked repositories and the most active 👩💻 committees 👨💻 on them from an organization on GitHub.
https://github.com/ajwad-shaikh/gitstat
api github heroku nodejs octokit rest
Last synced: 9 months ago
JSON representation
An API that serves the ✨ top ✨ forked repositories and the most active 👩💻 committees 👨💻 on them from an organization on GitHub.
- Host: GitHub
- URL: https://github.com/ajwad-shaikh/gitstat
- Owner: ajwad-shaikh
- License: mit
- Created: 2020-11-05T13:32:24.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-05T15:32:06.000Z (about 5 years ago)
- Last Synced: 2025-03-31T11:11:22.503Z (10 months ago)
- Topics: api, github, heroku, nodejs, octokit, rest
- Language: JavaScript
- Homepage: https://quiet-atoll-37147.herokuapp.com/org/microsoft?n=1&m=1
- Size: 27.3 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# GitStat
> An API that serves the ✨ top ✨ forked repositories and the most active 👩💻 committees 👨💻 on them from an organization on GitHub.
### Try the API on Heroku now!
[](https://quiet-atoll-37147.herokuapp.com/org/microsoft?n=2&m=4)
## Getting Started
```sh
# Clone the repo
git clone https://github.com/ajwad-shaikh/GitStat
cd GitStat
# Install dependencies
npm install
# Create .env | Get your token here -> https://github.com/settings/tokens
echo "GITHUB_AUTH_TOKEN=" > .env
# Run locally
npm start
```
## API
- GET **`/org/:orgName?n=N&m=M`**
- Parameters
- `orgName` - The organisation for whom you want to query the stats
- `n` - The API will fetch the top **N** most forked repositories under the organization (default: 1)
- `m` - The API will fetch the top **M** contributors on each repo on basis of the commits they have made to them. (default: 1)
- Example
- https://quiet-atoll-37147.herokuapp.com/org/microsoft?n=2&m=4
Fetches the top 4 contributors on each of the top 2 most forked repositories under the Microsoft organization on GitHub.
Response :
```json
[{"repo":"vscode","url":"https://github.com/microsoft/vscode","forks":16928,"contributors":[{"user":"bpasero","url":"https://github.com/bpasero","contributions":8972},{"user":"joaomoreno","url":"https://github.com/joaomoreno","contributions":7474},{"user":"jrieken","url":"https://github.com/jrieken","contributions":7296},{"user":"mjbvz","url":"https://github.com/mjbvz","contributions":5429}]},{"repo":"TypeScript","url":"https://github.com/microsoft/TypeScript","forks":8759,"contributors":[{"user":"ahejlsberg","url":"https://github.com/ahejlsberg","contributions":3629},{"user":"sheetalkamat","url":"https://github.com/sheetalkamat","contributions":2551},{"user":"mhegazy","url":"https://github.com/mhegazy","contributions":2308},{"user":"DanielRosenwasser","url":"https://github.com/DanielRosenwasser","contributions":2240}]}]
```
## Known Limitations
- Constraint on values of `n` and `m`
```
n, m <= 100
This is due to GitHub API limiting items per page to a maximum of 100, we would have to implement additional pagination support to overcome this limit.
```
## Contributing
If you have suggestions for how GitStat could be improved, or want to report a bug, open an issue! I'd love all and any contributions.
For more, check out the [Contributing Guide](CONTRIBUTING.md).
## License
[MIT](LICENSE) © 2020 Ajwad Shaikh
Made with :heart: by [Ajwad Shaikh](https://github.com/ajwad-shaikh)