stat

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Age                  string `json:"age"`
	AvgReleasePeriod     string `json:"avgReleasePeriod,omitempty"`
	ContributorCount     string `json:"contributorCount,omitempty"`
	ForkCount            string `json:"forkCount,omitempty"`
	FullName             string `json:"fullName,omitempty"`
	Homepage             string `json:"homepage,omitempty"`
	Issue                string `json:"issue"`
	Language             string `json:"language,omitempty"`
	LastPushedAt         string `json:"lastPushedAt"`
	LatestReleaseAt      string `json:"latestReleaseAt"`
	LastUpdatedAt        string `json:"lastUpdatedAt"`
	LatestDayStarCount   string `json:"latestDayStarCount"`
	LatestMonthStarCount string `json:"latestMonthStarCount"`
	LatestWeekStarCount  string `json:"latestWeekStarCount"`
	License              string `json:"license,omitempty"`
	Pull                 string `json:"pull"`
	ReleaseCount         string `json:"releaseCount,omitempty"`
	StarCount            string `json:"starCount,omitempty"`
	WatcherCount         string `json:"watcherCount,omitempty"`
}

func Overview

func Overview(accessToken string, repos ...string) []Data

type Issue

type Issue struct {
	Issues IssueConnection `graphql:"issues(first: 1, states: $issueStates)"`
}

type IssueConnection

type IssueConnection struct {
	TotalCount githubv4.Int
}

type IssueQuery

type IssueQuery struct {
	Issue Issue `graphql:"repository(owner: $owner, name: $name)"`
}

type Language

type Language struct {
	Color githubv4.String
	Name  githubv4.String
}

type LanguageConnection

type LanguageConnection struct {
	Nodes []Language
}

type License

type License struct {
	Name githubv4.String
}

type PRQuery

type PRQuery struct {
	PullRequest PullRequest `graphql:"repository(owner: $owner, name: $name)"`
}

type PageInfo

type PageInfo struct {
	EndCursor       githubv4.String
	HasNextPage     githubv4.Boolean
	HasPreviousPage githubv4.Boolean
	StartCursor     githubv4.String
}

type PullRequest

type PullRequest struct {
	PullRequests PullRequestConnection `graphql:"pullRequests(first: 1, states: $pullRequestStates)"`
}

type PullRequestConnection

type PullRequestConnection struct {
	TotalCount githubv4.Int
}

type Release

type Release struct {
	CreatedAt   githubv4.DateTime
	PublishedAt githubv4.DateTime
}

type ReleaseConnection

type ReleaseConnection struct {
	TotalCount githubv4.Int
}

type Repository

type Repository struct {
	CreatedAt       githubv4.DateTime
	ForkCount       githubv4.Int
	HomepageUrl     githubv4.URI
	Issues          IssueConnection `graphql:"issues(first: 1, states: $issueStates)"`
	LatestRelease   Release
	LicenseInfo     License
	PrimaryLanguage Language
	NameWithOwner   githubv4.String
	PullRequests    PullRequestConnection `graphql:"pullRequests(first: 1, states: $pullRequestStates)"`
	PushedAt        githubv4.DateTime
	Releases        ReleaseConnection `graphql:"releases(first: 1, orderBy: $orderBy)"`
	StargazerCount  githubv4.Int
	UpdatedAt       githubv4.DateTime
	Watchers        UserConnection `graphql:"watchers(first: 1)"`
}

type RepositoryCollaboratorConnection

type RepositoryCollaboratorConnection struct {
	TotalCount githubv4.Int
}

type RepositoryQuery

type RepositoryQuery struct {
	Repository Repository `graphql:"repository(owner: $owner, name: $name)"`
}

type Stargazer

type Stargazer struct {
	Stargazers StargazerConnection `graphql:"stargazers(first: 100, orderBy: $orderBy, after: $after)"`
}

type StargazerConnection

type StargazerConnection struct {
	Edges      []StargazerEdge
	PageInfo   PageInfo
	TotalCount githubv4.Int
}

type StargazerEdge

type StargazerEdge struct {
	Cursor    githubv4.String
	StarredAt githubv4.DateTime
}

type StargazerEdges

type StargazerEdges []StargazerEdge

func (StargazerEdges) LatestDayStars

func (s StargazerEdges) LatestDayStars() (int, int)

func (StargazerEdges) LatestMonthStars

func (s StargazerEdges) LatestMonthStars() int

func (StargazerEdges) LatestWeekStars

func (s StargazerEdges) LatestWeekStars() (int, int)

type StargazerQuery

type StargazerQuery struct {
	Stargazer Stargazer `graphql:"repository(owner: $owner, name: $name)"`
}

type Stat

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

func NewStat

func NewStat(repo string, accessToken ...string) *Stat

func (Stat) ContributorCount

func (s Stat) ContributorCount() int

func (Stat) GetTotal

func (s Stat) GetTotal(resp *github.Response) int

func (Stat) OpenIssueCount

func (s Stat) OpenIssueCount() githubv4.Int

func (Stat) OpenPullRequestCount

func (s Stat) OpenPullRequestCount() githubv4.Int

func (Stat) Repository

func (s Stat) Repository() Repository

type UserConnection

type UserConnection struct {
	TotalCount githubv4.Int
}

Jump to

Keyboard shortcuts

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