reports

package
v0.0.0-...-1f04c9c Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContributionCalendar

func ContributionCalendar(path, team string, dataClient *client.DataClient, w io.Writer) error

func ContributionComplexity

func ContributionComplexity(path, team string, dataClient *client.DataClient, w io.Writer) error

func ContributionCount

func ContributionCount(path, team string, dataClient *client.DataClient, w io.Writer) error

func ContributionDays

func ContributionDays(path, team string, dataClient *client.DataClient, w io.Writer) error

func ContributionGrowthOverTime

func ContributionGrowthOverTime(path, team string, dataClient *client.DataClient, w io.Writer) error

func ContributionUtility

func ContributionUtility(path, team string, dataClient *client.DataClient, w io.Writer) error

func ContributionsAddedCount

func ContributionsAddedCount(path, team string, dataClient *client.DataClient, w io.Writer) error

func ContributionsDeletedCount

func ContributionsDeletedCount(path, team string, dataClient *client.DataClient, w io.Writer) error

func ExternalContributions

func ExternalContributions(path, team string, dataClient *client.DataClient, w io.Writer) error

func GetContributionUsers

func GetContributionUsers(path, team string, dataClient *client.DataClient, w io.Writer) error

func GitHubIssuesClosed

func GitHubIssuesClosed(path, team string, dataClient *client.DataClient, w io.Writer) error

func GitHubIssuesOpened

func GitHubIssuesOpened(path, team string, dataClient *client.DataClient, w io.Writer) error

func InternalContributions

func InternalContributions(path, team string, dataClient *client.DataClient, w io.Writer) error

func NumberofWeeks

func NumberofWeeks(path, team string, dataClient *client.DataClient, w io.Writer) error

func OrganizationsImpactedfunc

func OrganizationsImpactedfunc(path, team string, dataClient *client.DataClient, w io.Writer) error

func PersonalContributions

func PersonalContributions(path, team string, dataClient *client.DataClient, w io.Writer) error

func PullRequestsClosedCount

func PullRequestsClosedCount(path, team string, dataClient *client.DataClient, w io.Writer) error

func PullRequestsOpenedCount

func PullRequestsOpenedCount(path, team string, dataClient *client.DataClient, w io.Writer) error

func RunExpectedContributionsReport

func RunExpectedContributionsReport(path, team string, dataClient *client.DataClient, w io.Writer) error

TODO FIX FLOAT64 TYPE FOR AVERAGES

func RunReport

func RunReport(path, team string, dataClient *client.DataClient, w io.Writer) error

func RunSummaryReport

func RunSummaryReport(path, team string, dataClient *client.DataClient) error

func StartDate

func StartDate(path, team string, dataClient *client.DataClient, w io.Writer) error

func TeamContributions

func TeamContributions(path, team string, dataClient *client.DataClient, w io.Writer) error

Types

type AverageSummaryReport

type AverageSummaryReport struct {
	StartDate                         string `json:"Week"`
	NumberofWeeks                     int    `json:"Number of Weeks"`
	AverageContributionCount          int    `json:"Average Countrbution Count"`
	AverageContributionGrowthOverTime int    `json:"Contribution Growth Over Time"`
	AverageContributionUtility        int    `json:"Contribution Utility"`
	AverageContributionComplexity     int    `json:"Contribution Complexity"`
	AverageContributionsAdded         int    `json:"Average Contributions Added"`
	AverageContributionsDeleted       int    `json:"Average Contributions Deleted"`
	AverageExpectedContributions      int    `json:"Average Expected Contributions"`
	AverageExternalContributions      int    `json:"Average External Contributions"`
	AverageGitHubIssuesClosed         int    `json:"Average GitHub Issues Closed"`
	AverageGitHubIssuesOpened         int    `json:"Average GitHub Issues Opened"`
	AverageInternalContributions      int    `json:"Average Internal Contributions"`
	AverageOrganizationsImpacted      string `json:"Average Organizations Impacted"`
	AveragePersonalContributions      int    `json:"Average Personal Contributions"`
	AveragePullRequestsClosedCount    int    `json:"Average Pull Requests Closed"`
	AveragePullRequestsOpenedCount    int    `json:"Average Pull Reuqests Opened"`
	AverageTeamContributions          int    `json:"Average Team Contributions"`
}

type Contributions

type Contributions struct {
	User struct {
		Name                    graphql.String
		ContributionsCollection struct {
			ContributionCalendar struct {
				Weeks []struct {
					ContributionDays []struct {
						ContributionCount graphql.Int
						Date              graphql.String
					}
					FirstDay graphql.String
				}
			}
		} `graphql:"contributionsCollection(organizationID: $orgID from: $startTime to: $endTime)"`
	} `graphql:"user(login: $login)"`
}

type DateTime

type DateTime string

type Report

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

func NewReport

func NewReport(weeks []*Week) *Report

func (*Report) AverageContributionsCount

func (r *Report) AverageContributionsCount() int

type SummaryReport

type SummaryReport struct {
	StartDate                  string `json:"Week"`
	NumberofWeeks              int    `json:"Number of Weeks"`
	ContributionCount          int    `json:" Countrbution Count"`
	ContributionGrowthOverTime int    `json:"Contribution Growth Over Time"`
	ContributionUtility        int    `json:"Contribution Utility"`
	ContributionComplexity     int    `json:"Contribution Complexity"`
	ContributionsAddedCount    int    `json:"Contributions Added Count"`
	ContributionsDeletedCount  int    `json:"Contributions Deleted Count"`
	ExpectedContributions      int    `json:"Expected Contributions"`
	ExternalContributions      int    `json:"External Contributions"`
	GitHubIssuesClosed         int    `json:"GitHub Issues Closed"`
	GitHubIssuesOpened         int    `json:"GitHub Issues Opened"`
	InternalContributions      int    `json:"Internal Contributions"`
	OrganizationsImpacted      string `json:"Organizations Impacted"`
	PersonalContributions      int    `json:"Personal Contributions"`
	PullRequestsClosedCount    int    `json:"Pull Requests Closed"`
	PullRequestsOpenedCount    int    `json:"Pull Reuqests Opened"`
	TeamContributions          int    `json:" Team Contributions"`
}

type Team

type Team []string

type Teams

type Teams struct {
	Map map[string]Team `yaml:"map"`
}

type TokenAuthTransport

type TokenAuthTransport struct {
	Token string
}

func (TokenAuthTransport) RoundTrip

func (t TokenAuthTransport) RoundTrip(req *http.Request) (*http.Response, error)

type Week

type Week struct {
	StartDate       string         `json:"Week"`
	ContributionMap map[string]int `json:"Contributions"`
}

func ExpectedContributions

func ExpectedContributions(path, team string, dataClient *client.DataClient) ([]*Week, error)

func GetWorkWeeks

func GetWorkWeeks(path, team string, dataClient *client.DataClient) ([]*Week, error)

func (*Week) AverageContributions

func (w *Week) AverageContributions() float64

func (*Week) Contributions

func (w *Week) Contributions() int

func (*Week) ListContributors

func (w *Week) ListContributors() []string

func (*Week) NonContributor

func (w *Week) NonContributor() bool

Jump to

Keyboard shortcuts

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