https://github.com/worldofprasanna/github-stats
Command line utility to extract info from Github
https://github.com/worldofprasanna/github-stats
github-api golang
Last synced: 10 days ago
JSON representation
Command line utility to extract info from Github
- Host: GitHub
- URL: https://github.com/worldofprasanna/github-stats
- Owner: worldofprasanna
- Created: 2019-11-18T07:34:50.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-09T07:58:19.000Z (over 5 years ago)
- Last Synced: 2024-06-20T00:38:11.540Z (over 1 year ago)
- Topics: github-api, golang
- Language: Go
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# github-stats
[](https://github.com/RichardLitt/standard-readme)
[](https://circleci.com/gh/worldofprasanna/github-stats)
[](https://codeclimate.com/github/worldofprasanna/github-stats/maintainability)
> Extract info about commits from github
## Table of Contents
- [github-stats](#github-stats)
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [Usage](#usage)
- [Tech specifics](#tech-specifics)
- [Assumptions](#assumptions)
- [Maintainers](#maintainers)
- [Contributing](#contributing)
- [License](#license)
## Installation
There are 3 ways to install this command line utility,
1. Install from source code. This needs golang to be installed (> 1.11) and GOPATH to be set with properly with GOPATH added to the PATH.
```
./bin/install
```
2. If you prefer Docker,
```
# Build the docker container,
docker build -t github-stats .
# To test the functionality,
a. Fetch the active day of week along with average commit
docker run github-stats activeDay --weeks=20 kubernetes/kubernetes
b. List the average commit for week
docker run github-stats listAverageCommits kubernetes/kubernetes
```
3. Github releases contains binaries targeting difference operating systems. This is generated using [goreleaser](https://github.com/goreleaser/goreleaser)
[Download Binary here](https://github.com/worldofprasanna/github-stats/releases/tag/v1.0.0)
## Usage
```
# To know about the command, use --help option. After installation is successful,
./bin/run --help
./bin/run activeDay --weeks=20 kubernetes/kubernetes
./bin/run listAverageCommits --sort=desc kubernetes/kubernetes
```
```
# To run the unit test
./bin/test
# To run the linter
./bin/lint
# To get the binary
./bin/build
```
## Tech specifics
- This uses CircleCI to run unit tests, linters, build and publish the package. You can see the pipelines [here](https://circleci.com/workflow-run/3e861475-a6e1-46de-a664-5395783c92c9)
- Code climate integration is done to see if there are any code smells
- This repo depends on Go modules and hence it needs golang > 1.11
## Assumptions
- Number of weeks would be less than or equal to 52
- Listing the average commits per day can be a separate sub command
- When listing the average commits per day, it will always fetch for last 52 weeks
## Maintainers
[@worldofprasanna](https://github.com/worldofprasanna)
## Contributing
PRs accepted.
Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
## License
MIT © 2019 Prasanna