mergequeue

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: 7 Imported by: 0

Documentation

Overview

For a GitHub project which CI is managed by Prow, we define the merge queue as the list of Pull Requests that are ready to be merged at any given date. They have been already reviewed, approved, don't have any needs-* label and don't have any do-not-merge/* label. The package provides several functions to query data about the merge queue.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatePREntered

func DatePREntered(pr *types.MergeQueuePullRequestFragment, date time.Time) time.Time

DatePREntered 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 Handler

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

func NewHandler

func NewHandler(client *gh.Client) *Handler

func (*Handler) LengthAt

func (mq *Handler) LengthAt(date time.Time) (int, []int, error)

LengthAt returns the merge queue size for a given date and the PR numbers that were part of the queue at that date.

func (*Handler) TimesToMerge

func (mq *Handler) TimesToMerge(startDate, endDate time.Time) (map[int]time.Duration, error)

TimesToMerge returns a map with the duration each merged PR number took to land in the time frame between the given start and end dates.

Jump to

Keyboard shortcuts

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