gh

package
v0.0.0-...-2081df6 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatePREnteredMergeQueue

func DatePREnteredMergeQueue(pr *PullRequestFragment, date time.Time) time.Time

DatePREnteredMergeQueue returns when a PR entered the merge queue before a given date, zero value date if it was not in the merge queue by that date.

Types

type Client

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

func NewClient

func NewClient(tokenPath, source string, dataDays int) (*Client, error)

func (*Client) DataDays

func (c *Client) DataDays() int

func (*Client) MergeQueueSizeByDate

func (c *Client) MergeQueueSizeByDate(date time.Time) (int, error)

MergeQueueSizeByDate returns the merge queue size for a given date.

func (*Client) Source

func (c *Client) Source() string

type Label

type Label struct {
	Name string
}

type LabeledEventFragment

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

type PullRequestFragment

type PullRequestFragment struct {
	Number        int
	TimelineItems `graphql:"timelineItems(first:100, itemTypes:[LABELED_EVENT, UNLABELED_EVENT])"`
}

type TimelineItem

type TimelineItem struct {
	LabeledEventFragment   `graphql:"... on LabeledEvent"`
	UnlabeledEventFragment `graphql:"... on UnlabeledEvent"`
}

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