reporter

package module
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2020 License: MIT Imports: 3 Imported by: 0

README

Generates periodical reports for repositories or organization or aggregating statistics for current situation in these repos.

Install

Download binary for your platform from GitHub releases: https://github.com/g4s8/reporter/releases/latest

Use shell script to get latest release binary (only Linux and MacOSx):

curl -L https://raw.githubusercontent.com/g4s8/reporter/master/scripts/download.sh | sh

On MacOS you can install it using brew tool:

brew tap g4s8/.tap https://github.com/g4s8/.tap
brew install reporter

Build from sources:

git clone https://github.com/g4s8/reporter.git
cd reporter
go build
# target binary will be placed at $PWD/reporter

Usage

Create API token without permissions (to increase GitHub API quota limits). To use this token with reporter:

  1. Put it to ~/.config/reporter/github_token.txt
  2. Set it to GITHUB_TOKEN environment variable
  3. Use --token CLI option

The syntax is: reporter <action> <source> where actions is either report or stats, and source is either organization name (for full report over all repositories) or full repository coordinates (user/repo).

Daily and weekly reports

Daily and weekly report shows all merged pull requests for specified period.

To generate daily report run:

./reporter report --period=daily artipie

For weekly report:

./reporter report --period=weekly artipie

Performance metrics

For collecting performance metrics for period use:

./reporter contrib --period=weekly artipie

Options

To filter pull requests by user use --author=<username>, where <username> is either full GitHub username (ignore case) or me keyowrd for current user.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	context.Context
	*github.Client
}

func New

func New(ctx context.Context, tkn string) *Context

type PullResult

type PullResult struct {
	Repo *github.Repository
	Pull *github.PullRequest
}

type PullWithReview

type PullWithReview struct {
	Repo   *github.Repository
	Pull   *github.PullRequest
	Review []*github.PullRequestReview
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL