Documentation ¶
Overview ¶
package pulls deals with munging of github pull requests
Index ¶
- func HasLabel(labels []github.Label, name string) bool
- func MungePullRequests(client *github.Client, pullMungers, org, project string, minPRNumber int, ...) error
- func RegisterMunger(munger Munger) error
- func RegisterMungerOrDie(munger Munger)
- type BlunderbussConfig
- type BlunderbussMunger
- type LGTMAfterCommitMunger
- type Munger
- type RemoveNeedsRebaseMunger
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, org, project string, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent, dryrun bool)
func (*BlunderbussMunger) Name ¶
func (b *BlunderbussMunger) Name() string
type LGTMAfterCommitMunger ¶
type LGTMAfterCommitMunger struct{}
func (LGTMAfterCommitMunger) MungePullRequest ¶
func (LGTMAfterCommitMunger) MungePullRequest(client *github.Client, org, project string, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent, dryrun bool)
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, org, user string, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent, dryrun bool) Name() string }
type RemoveNeedsRebaseMunger ¶
type RemoveNeedsRebaseMunger struct{}
func (RemoveNeedsRebaseMunger) MungePullRequest ¶
func (RemoveNeedsRebaseMunger) MungePullRequest(client *github.Client, org, project string, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent, dryrun bool)
func (RemoveNeedsRebaseMunger) Name ¶
func (RemoveNeedsRebaseMunger) Name() string
Click to show internal directories.
Click to hide internal directories.