orgstats

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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,
	excludeForks 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