types

package
v0.0.0-...-11fe650 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatsAction Action = "stats"
	BatchAction Action = "batch"

	FetchMode = "fetch"
	PlotMode  = "plot"

	MergeQueueLengthMetric Metric = "merge-queue-length"
	TimeToMergeMetric      Metric = "time-to-merge"
	RetestsToMergeMetric   Metric = "retests-to-merge"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string

func (Action) IsValid

func (a Action) IsValid() error

type BarePRList

type BarePRList []struct {
	BarePullRequestFragment `graphql:"... on PullRequest"`
}

type BarePullRequestFragment

type BarePullRequestFragment struct {
	Number    int
	CreatedAt time.Time
	MergedAt  time.Time
}

type ChatopsPRList

type ChatopsPRList []struct {
	ChatopsPullRequestFragment `graphql:"... on PullRequest"`
}

type ChatopsPullRequestFragment

type ChatopsPullRequestFragment struct {
	Number        int
	CreatedAt     time.Time
	MergedAt      time.Time
	TimelineItems `graphql:"timelineItems(first:100, itemTypes:[PULL_REQUEST_COMMIT, ISSUE_COMMENT])"`
}

type Commit

type Commit struct {
	PushedDate time.Time
}

type Curve

type Curve struct {
	X     []string
	Y     []float64
	Color color.RGBA
	Title string
}

type IssueCommentFragment

type IssueCommentFragment struct {
	CreatedAt time.Time
	BodyText  string
}

type Label

type Label struct {
	Name string
}

type LabeledEventFragment

type LabeledEventFragment struct {
	CreatedAt  time.Time
	AddedLabel Label `graphql:"addedLabel:label"`
}

type MergeQueuePRList

type MergeQueuePRList []struct {
	MergeQueuePullRequestFragment `graphql:"... on PullRequest"`
}

type MergeQueuePullRequestFragment

type MergeQueuePullRequestFragment struct {
	Number        int
	CreatedAt     time.Time
	MergedAt      time.Time
	TimelineItems `graphql:"timelineItems(first:100, itemTypes:[LABELED_EVENT, UNLABELED_EVENT])"`
}

type Metric

type Metric string

func (Metric) IsValid

func (m Metric) IsValid() error

func (Metric) ResultsName

func (m Metric) ResultsName() string

type Mode

type Mode string

func (Mode) IsValid

func (m Mode) IsValid() error

type Options

type Options struct {
	Action

	Path            string
	TokenPath       string
	Source          string
	DataDays        int
	LogLevel        string
	RequestedAction Action

	// stats options
	TimeToMergeRedLevel         float64
	TimeToMergeYellowLevel      float64
	MergeQueueLengthRedLevel    float64
	MergeQueueLengthYellowLevel float64
	RetestsToMergeYellowLevel   float64
	RetestsToMergeRedLevel      float64

	// batch options
	Mode         string
	TargetMetric string
	StartDate    string
}

type PlotData

type PlotData struct {
	Title      string
	XAxisLabel string
	YAxisLabel string
	Curves     []Curve
}

type PullRequestCommitFragment

type PullRequestCommitFragment struct {
	Commit Commit
}

type TimelineItem

type TimelineItem struct {
	LabeledEventFragment      `graphql:"... on LabeledEvent"`
	UnlabeledEventFragment    `graphql:"... on UnlabeledEvent"`
	IssueCommentFragment      `graphql:"... on IssueComment"`
	PullRequestCommitFragment `graphql:"... on PullRequestCommit"`
}

type TimelineItems

type TimelineItems struct {
	Nodes []TimelineItem
}

type UnlabeledEventFragment

type UnlabeledEventFragment struct {
	CreatedAt    time.Time
	RemovedLabel Label `graphql:"removedLabel:label"`
}

Jump to

Keyboard shortcuts

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