Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

hubstats Build Status

hubstats is a command line tool to count opened/closed/commented GitHub pull requests.

Prerequisite

Install Leiningen and run it on Java 8+.

Usage

lein run --organization $organization --repository $repository

If an access token is required:

lein run --organization $organization --repository $repository --token "$user:$token"

Output example:

pull requests for softwarevidal/arthur ->
        since 1 week(s):
                10 opened / 14 closed / 10 commented (90 comments)
                opened per author: {"jprudent" 4, "cmahalin" 4, "omabrouki" 1, "AElMehdiVidal" 1}
                comments per author: {"vidal-rm" 68, "jcgay" 11, "nicokosi" 3, "jprudent" 3, "AElMehdiVidal" 3, "omabrouki" 2}
                closed per author: {"cmahalin" 7, "nicokosi" 3, "jcgay" 2, "jprudent" 1, "AElMehdiVidal" 1}

List of all parameters:

lein run

will output:

Count opened/closed/commented GitHub pull requests.
Mandatory parameters:
	--organization		GitHub organization
	-o			GitHub organization (shorthand)
	--repository		GitHub repository
	-r			GitHub repository (shorthand)
	--token			GitHub access token prefixed with GitHub user and ':', i.e 'myUser:myToken' (optional)
	-t			GitHub access token prefixed with GitHub user and ':', i.e 'myUser:myToken' (shorthand, optional)
Optional parameters:
	--repositories		Comma-separated list of repositories (optional)
	--since-weeks		output events that occurred since this number of weeks (optional, default: 1)
	-w			output events that occurred since this number of weeks (shorthand, optional, default: 1)
	--since-days		output events that occurred since this number of days (optional)
	-d			output events that occurred since this number of days (shorthand, optional)
	--since			output events that occurred since a date with format '"yyyy-MM-dd'T'HH:mm:ssZ' (optional)
	-s			output events that occurred since a date with format '"yyyy-MM-dd'T'HH:mm:ssZ' (shorthand, optional)

Examples:
	lein run --organization docker --repository containerd --token "$user:$token"
	lein run --organization docker --repository containerd --since "2017-01-17T00:00:00Z"
	lein run --organization docker --repository containerd --since-days 10
	lein run --organization docker --repositories docker,containerd

More command examples:

lein run --organization docker --repository containerd --token $token
lein run --organization docker --repository containerd --since "2017-01-17T00:00:00Z"
lein run --organization docker --repository containerd --since-days 10
lein run --organization docker --repositories docker,containerd

Command line installation

As a portable Java application

Create JAR with all dependencies:

lein uberjar

Then launch (note that Java is required):

java -jar target/hubstats-*-standalone.jar

On Unix-like systems, you can create an executable via the following command:

./make-exec.sh hubstats

This executable, which requires Java, can be moved to /usr/local/bin, for example.

As a *nix native executable

Create a native executable via GraalVM running ./generate-executable.sh. Only works for Linux and macOS.

Developer tasks

Run tests

lein test

Run the code linter

Install clj-kondo, then run:

clj-kondo --lint .

Format the code

Check:

lein cljfmt check

Format:

lein cljfmt fix

Display dependencies

Display all dependencies, as a tree:

lein deps :tree-data

Display outdated dependencies:

lein ancient

Upgrade dependencies

lein ancient upgrade

About

Command-line for GitHub pull request statistics

Topics

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.