orgstats

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExtractAdditions = func(st Stat) int {
	return st.Additions
}

ExtractAdditions extract the adds section of the given stat

View Source
var ExtractCommits = func(st Stat) int {
	return st.Commits
}

ExtractCommits extract the commit section of the given stat

View Source
var ExtractDeletions = func(st Stat) int {
	return st.Deletions
}

ExtractDeletions extract the rms section of the given stat

View Source
var Reviews = func(st Stat) int {
	return st.Reviews
}

Reviews extract the reviewed prs section of the given stat

Functions

This section is empty.

Types

type Extract

type Extract func(st Stat) int

Extract is a function that converts a multiple stat into a single stat

type Stat

type Stat struct {
	Additions, Deletions, Commits, Reviews int
}

Stat represents an user adds, rms and commits count

type StatPair

type StatPair struct {
	Key   string
	Value int
}

func Sort

func Sort(s Stats, extract Extract) []StatPair

type Stats

type Stats struct {
	// contains filtered or unexported fields
}

Stats contains the user->Stat mapping

func Gather

func Gather(
	ctx context.Context,
	client *github.Client,
	org string,
	userBlacklist, repoBlacklist []string,
	since time.Time,
	includeReviewStats bool,
) (Stats, error)

Gather a given organization's stats

func NewStats

func NewStats(since time.Time) Stats

NewStats return a new Stats map

func (Stats) For added in v1.8.0

func (s Stats) For(login string) Stat

func (Stats) Logins added in v1.8.0

func (s Stats) Logins() []string

Jump to

Keyboard shortcuts

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