Documentation ¶
Overview ¶
package pulls deals with munging of github pull requests
Index ¶
- func GetLabelsWithPrefix(labels []github.Label, prefix string) []string
- func HasLabel(labels []github.Label, name string) bool
- func MungePullRequests(client *github.Client, pullMungers string, opts opts.MungeOptions) error
- func RegisterMunger(munger Munger) error
- func RegisterMungerOrDie(munger Munger)
- type BlunderbussConfig
- type BlunderbussMunger
- type LGTMAfterCommitMunger
- type Munger
- type NeedsRebaseMunger
- type OkToTestMunger
- type PRSizeMunger
- type PingCIMunger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MungePullRequests ¶
func RegisterMunger ¶
func RegisterMungerOrDie ¶
func RegisterMungerOrDie(munger Munger)
Types ¶
type BlunderbussConfig ¶
type BlunderbussConfig struct {
PrefixMap map[string][]string `json:"prefixMap,omitempty" yaml:"prefixMap,omitempty"`
}
A BlunderbussConfig maps a set of file prefixes to a set of owner names (github users)
func (*BlunderbussConfig) FindOwners ¶
func (b *BlunderbussConfig) FindOwners(filename string) []string
type BlunderbussMunger ¶
type BlunderbussMunger struct {
// contains filtered or unexported fields
}
func (*BlunderbussMunger) MungePullRequest ¶
func (b *BlunderbussMunger) MungePullRequest(client *github.Client, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent, opts opts.MungeOptions)
func (*BlunderbussMunger) Name ¶
func (b *BlunderbussMunger) Name() string
type LGTMAfterCommitMunger ¶
type LGTMAfterCommitMunger struct{}
func (LGTMAfterCommitMunger) MungePullRequest ¶
func (LGTMAfterCommitMunger) MungePullRequest(client *github.Client, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent, opts opts.MungeOptions)
func (LGTMAfterCommitMunger) Name ¶
func (LGTMAfterCommitMunger) Name() string
type Munger ¶
type Munger interface { // Take action on a specific pull request includes: // * The org/user pair for the PR // * The PR object // * The issue object for the PR, github stores some things (e.g. labels) in an "issue" object with the same number as the PR // * The commits for the PR // * The events on the PR // * dryrun, if true, the munger should take no action, and only report what it would have done. MungePullRequest(client *github.Client, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent, opts opts.MungeOptions) Name() string }
type NeedsRebaseMunger ¶
type NeedsRebaseMunger struct{}
func (NeedsRebaseMunger) MungePullRequest ¶
func (NeedsRebaseMunger) MungePullRequest(client *github.Client, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent, opts opts.MungeOptions)
func (NeedsRebaseMunger) Name ¶
func (NeedsRebaseMunger) Name() string
type OkToTestMunger ¶
type OkToTestMunger struct{}
OkToTestMunger looks for situations where a reviewer has LGTM'd a PR, but it isn't ok to test by the k8s-bot, and adds an 'ok to test' comment to the PR.
func (OkToTestMunger) MungePullRequest ¶
func (OkToTestMunger) MungePullRequest(client *github.Client, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent, opts opts.MungeOptions)
func (OkToTestMunger) Name ¶
func (OkToTestMunger) Name() string
type PRSizeMunger ¶
type PRSizeMunger struct{}
func (PRSizeMunger) MungePullRequest ¶
func (PRSizeMunger) MungePullRequest(client *github.Client, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent, opts opts.MungeOptions)
func (PRSizeMunger) Name ¶
func (PRSizeMunger) Name() string
type PingCIMunger ¶
type PingCIMunger struct{}
PingCIMunger looks for situations CI (Travis | Shippable) has flaked for some reason and we want to re-run them. Achieves this by closing and re-opening the pr
func (PingCIMunger) MungePullRequest ¶
func (PingCIMunger) MungePullRequest(client *github.Client, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent, opts opts.MungeOptions)
func (PingCIMunger) Name ¶
func (PingCIMunger) Name() string
Click to show internal directories.
Click to hide internal directories.