backports

package
v0.0.0-...-c70306c Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Merged int = iota
	Open
	Any
)

Backport states

Variables

This section is empty.

Functions

This section is empty.

Types

type Backport

type Backport struct {
	Version       string
	VersionTitle  string
	Title         string
	State         string
	URL           string
	IssueNumber   int
	ParentVersion string
	ParentURL     string
	CreatedAt     time.Time
}

Backport represents a backported PR

func ListStale

func ListStale(org, team string, lopts ListOpts) ([]*Backport, error)

ListStale lists backports older than X days (15 by default)

Configure the time threshold passing a ListOpts argument like:

ListStale("fooorg", "barteam", ListOpts{OlderThan: 60})

type BackportGroup

type BackportGroup map[string][]*Backport

BackportGroup groups backport by PR title

func ListGrouped

func ListGrouped(org, team string, lopts ListOpts) (BackportGroup, error)

ListGrouped groups backports by PR

All the backports from a PR will be added to the same map key

type ListOpts

type ListOpts struct {
	Since     string // Date string formatted as Year-Month-Day (2006-01-02)
	OlderThan int    // List issues/PRs older than this (days)
}

ListOpts are options passed to the different list functions

Jump to

Keyboard shortcuts

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