blockers

package
v0.0.901 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blocker

type Blocker struct {
	Number     int
	Title, URL string
}

Blocker specifies an issue number that should block keeper from merging.

type Blockers

type Blockers struct {
	Repo   map[OrgRepo][]Blocker       `json:"repo,omitempty"`
	Branch map[OrgRepoBranch][]Blocker `json:"branch,omitempty"`
}

Blockers holds maps of issues that are blocking various repos/branches.

func FindAll

func FindAll(spc scmProviderClient, log *logrus.Entry, label, orgRepoTokens string) (Blockers, error)

FindAll finds issues with label in the specified orgs/repos that should block keeper.

func (Blockers) GetApplicable

func (b Blockers) GetApplicable(org, repo, branch string) []Blocker

GetApplicable returns the subset of blockers applicable to the specified branch.

type Issue

type Issue struct {
	Number     githubql.Int
	Title      githubql.String
	URL        githubql.String
	Repository struct {
		Name  githubql.String
		Owner struct {
			Login githubql.String
		}
	}
}

Issue holds graphql response data about issues

type OrgRepo

type OrgRepo struct {
	Org, Repo string
}

OrgRepo the org + repo

type OrgRepoBranch

type OrgRepoBranch struct {
	Org, Repo, Branch string
}

OrgRepoBranch the org + repo + branch

Jump to

Keyboard shortcuts

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