Skip to content

Latest commit

 

History

History
93 lines (63 loc) · 2.82 KB

README.md

File metadata and controls

93 lines (63 loc) · 2.82 KB

github-stats

standard-readme compliant CircleCI Maintainability

Extract info about commits from github

Table of Contents

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
  1. 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
  1. Github releases contains binaries targeting difference operating systems. This is generated using goreleaser

Download Binary here

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
  • 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

Contributing

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2019 Prasanna