source

package
Version: v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const MaxPageSize = 100

Variables

This section is empty.

Functions

This section is empty.

Types

type IssueOrderField

type IssueOrderField = ghv4.IssueOrderField
const (
	IssueOrderFieldCreatedAt IssueOrderField = ghv4.IssueOrderFieldCreatedAt
	IssueOrderFieldUpdatedAt IssueOrderField = ghv4.IssueOrderFieldUpdatedAt
	IssueOrderFieldComments  IssueOrderField = ghv4.IssueOrderFieldComments
)

type OrderDirection

type OrderDirection = ghv4.OrderDirection
const (
	OrderDirectionAsc  OrderDirection = ghv4.OrderDirectionAsc
	OrderDirectionDesc OrderDirection = ghv4.OrderDirectionDesc
)

type OrgStat

type OrgStat struct {
	Name         string
	LogoURL      string
	Issues       int
	Commits      int
	Reviews      int
	PullRequests int
}

type PullRequest

type PullRequest struct {
	Username     string
	Title        string
	URL          *url.URL
	BaseRef      string
	State        string
	Additions    int
	Deletions    int
	Commits      int
	ChangedFiles int
	ChangeSize   string
	CreatedAt    time.Time
	ClosedAt     time.Time
	MergedAt     time.Time
	UpdatedAt    time.Time
	Labels       []string
	SortTime     time.Time
}

type PullRequestCallback added in v0.2.0

type PullRequestCallback func(pr *PullRequest) bool

type PullRequestState

type PullRequestState = ghv4.PullRequestState
const (
	PullRequestStateOpen   PullRequestState = ghv4.PullRequestStateOpen
	PullRequestStateClosed PullRequestState = ghv4.PullRequestStateClosed
	PullRequestStateMerged PullRequestState = ghv4.PullRequestStateMerged
)

type Source

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

func NewSource

func NewSource(token string, cache string, interval time.Duration) *Source

func (*Source) CommitCounter

func (s *Source) CommitCounter(ctx context.Context, username string) (int, error)

func (*Source) OrgStat

func (s *Source) OrgStat(ctx context.Context, username string, org string) (*OrgStat, error)

func (*Source) PullRequests

func (s *Source) PullRequests(ctx context.Context, username string, states []PullRequestState, orderField IssueOrderField, orderDirection OrderDirection, size int, cbs ...PullRequestCallback) ([]*PullRequest, error)

func (*Source) Stat

func (s *Source) Stat(ctx context.Context, username string) (*Stat, error)

type Stat

type Stat struct {
	Name          string
	Stars         int
	Forks         int
	Issues        int
	Commits       int
	Reviews       int
	PullRequests  int
	ContributedTo int
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL