Documentation ¶
Overview ¶
Package mungers deals with munging of github pull requests
Index ¶
- Constants
- Variables
- func EachLoop() error
- func InitializeMungers(config *github.Config, features *features.Features) error
- func MungeIssue(obj *github.MungeObject) error
- func NewPublisherLog(buf *bytes.Buffer) *plog
- func RegisterMunger(munger Munger) error
- func RegisterMungerOrDie(munger Munger)
- func RegisterMungers(requestedMungers []string) error
- func RegisterOptions(opts *options.Options) sets.String
- func RegisterStaleIssueComments(s StaleIssueComment)
- func RequestedFeatures() []string
- func SyncLabels(allLabels, desiredLabels sets.String, obj *github.MungeObject) error
- type ApprovalHandler
- func (*ApprovalHandler) EachLoop() error
- func (h *ApprovalHandler) Initialize(config *github.Config, features *features.Features) error
- func (h *ApprovalHandler) Munge(obj *github.MungeObject)
- func (*ApprovalHandler) Name() string
- func (h *ApprovalHandler) RegisterOptions(opts *options.Options) sets.String
- func (*ApprovalHandler) RequiredFeatures() []string
- type AssignFixesMunger
- func (a *AssignFixesMunger) EachLoop() error
- func (a *AssignFixesMunger) Initialize(config *github.Config, features *features.Features) error
- func (a *AssignFixesMunger) Munge(obj *github.MungeObject)
- func (a *AssignFixesMunger) Name() string
- func (a *AssignFixesMunger) RegisterOptions(opts *options.Options) sets.String
- func (a *AssignFixesMunger) RequiredFeatures() []string
- type Batch
- type BlockPath
- func (b *BlockPath) EachLoop() error
- func (b *BlockPath) Initialize(config *github.Config, features *features.Features) error
- func (b *BlockPath) Munge(obj *github.MungeObject)
- func (b *BlockPath) Name() string
- func (b *BlockPath) RegisterOptions(opts *options.Options) sets.String
- func (b *BlockPath) RequiredFeatures() []string
- func (b *BlockPath) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
- type BlunderbussConfig
- type BlunderbussMunger
- func (b *BlunderbussMunger) EachLoop() error
- func (b *BlunderbussMunger) Initialize(config *github.Config, features *features.Features) error
- func (b *BlunderbussMunger) Munge(obj *github.MungeObject)
- func (b *BlunderbussMunger) Name() string
- func (b *BlunderbussMunger) RegisterOptions(opts *options.Options) sets.String
- func (b *BlunderbussMunger) RequiredFeatures() []string
- type CheckLabelsMunger
- func (c *CheckLabelsMunger) EachLoop() error
- func (c *CheckLabelsMunger) Initialize(config *githubhelper.Config, features *features.Features) error
- func (c *CheckLabelsMunger) Munge(obj *githubhelper.MungeObject)
- func (c *CheckLabelsMunger) Name() string
- func (c *CheckLabelsMunger) RegisterOptions(opts *options.Options) sets.String
- func (c *CheckLabelsMunger) RequiredFeatures() []string
- type CherrypickAutoApprove
- func (c *CherrypickAutoApprove) EachLoop() error
- func (c *CherrypickAutoApprove) Initialize(config *github.Config, features *features.Features) error
- func (c *CherrypickAutoApprove) Munge(obj *github.MungeObject)
- func (c *CherrypickAutoApprove) Name() string
- func (c *CherrypickAutoApprove) RegisterOptions(opts *options.Options) sets.String
- func (c *CherrypickAutoApprove) RequiredFeatures() []string
- type CherrypickQueue
- func (c *CherrypickQueue) EachLoop() error
- func (c *CherrypickQueue) Initialize(config *github.Config, features *features.Features) error
- func (c *CherrypickQueue) Munge(obj *github.MungeObject)
- func (c *CherrypickQueue) Name() string
- func (c *CherrypickQueue) RegisterOptions(opts *options.Options) sets.String
- func (c *CherrypickQueue) RequiredFeatures() []string
- type ClearPickAfterMerge
- func (c *ClearPickAfterMerge) EachLoop() error
- func (c *ClearPickAfterMerge) Initialize(config *github.Config, features *features.Features) error
- func (c *ClearPickAfterMerge) Munge(obj *github.MungeObject)
- func (c *ClearPickAfterMerge) Name() string
- func (c *ClearPickAfterMerge) RegisterOptions(opts *options.Options) sets.String
- func (c *ClearPickAfterMerge) RequiredFeatures() []string
- type CloseStale
- func (CloseStale) EachLoop() error
- func (CloseStale) Initialize(config *github.Config, features *features.Features) error
- func (CloseStale) Munge(obj *github.MungeObject)
- func (CloseStale) Name() string
- func (CloseStale) RegisterOptions(opts *options.Options) sets.String
- func (CloseStale) RequiredFeatures() []string
- func (s CloseStale) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
- type CommentDeleter
- func (CommentDeleter) EachLoop() error
- func (CommentDeleter) Initialize(config *github.Config, features *features.Features) error
- func (CommentDeleter) Munge(obj *github.MungeObject)
- func (CommentDeleter) Name() string
- func (CommentDeleter) RegisterOptions(opts *options.Options) sets.String
- func (CommentDeleter) RequiredFeatures() []string
- type CommentDeleterJenkins
- type DocsNeedNoRetest
- func (DocsNeedNoRetest) EachLoop() error
- func (s *DocsNeedNoRetest) Initialize(config *github.Config, features *features.Features) error
- func (DocsNeedNoRetest) Munge(obj *github.MungeObject)
- func (DocsNeedNoRetest) Name() string
- func (DocsNeedNoRetest) RegisterOptions(opts *options.Options) sets.String
- func (DocsNeedNoRetest) RequiredFeatures() []string
- type InactiveReviewHandler
- func (i *InactiveReviewHandler) EachLoop() error
- func (i *InactiveReviewHandler) Initialize(config *github.Config, features *features.Features) error
- func (i *InactiveReviewHandler) Munge(obj *github.MungeObject)
- func (i *InactiveReviewHandler) Name() string
- func (*InactiveReviewHandler) RegisterOptions(opts *options.Options) sets.String
- func (i *InactiveReviewHandler) RequiredFeatures() []string
- type LGTMAfterCommitMunger
- func (LGTMAfterCommitMunger) EachLoop() error
- func (LGTMAfterCommitMunger) Initialize(config *github.Config, features *features.Features) error
- func (LGTMAfterCommitMunger) Munge(obj *github.MungeObject)
- func (LGTMAfterCommitMunger) Name() string
- func (LGTMAfterCommitMunger) RegisterOptions(opts *options.Options) sets.String
- func (LGTMAfterCommitMunger) RequiredFeatures() []string
- func (l LGTMAfterCommitMunger) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
- type LabelMunger
- func (*LabelMunger) EachLoop() error
- func (*LabelMunger) Initialize(config *github.Config, features *features.Features) error
- func (lm *LabelMunger) Munge(obj *github.MungeObject)
- func (*LabelMunger) Name() string
- func (lm *LabelMunger) RegisterOptions(opts *options.Options) sets.String
- func (*LabelMunger) RequiredFeatures() []string
- type LabelUnapprovedPicks
- func (LabelUnapprovedPicks) EachLoop() error
- func (LabelUnapprovedPicks) Initialize(config *github.Config, features *features.Features) error
- func (LabelUnapprovedPicks) Munge(obj *github.MungeObject)
- func (LabelUnapprovedPicks) Name() string
- func (LabelUnapprovedPicks) RegisterOptions(opts *options.Options) sets.String
- func (LabelUnapprovedPicks) RequiredFeatures() []string
- func (l LabelUnapprovedPicks) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
- type MilestoneMaintainer
- func (m *MilestoneMaintainer) EachLoop() error
- func (m *MilestoneMaintainer) Initialize(config *github.Config, features *features.Features) error
- func (m *MilestoneMaintainer) Munge(obj *github.MungeObject)
- func (m *MilestoneMaintainer) Name() string
- func (m *MilestoneMaintainer) RegisterOptions(opts *options.Options) sets.String
- func (m *MilestoneMaintainer) RequiredFeatures() []string
- type Munger
- type NagFlakeIssues
- func (NagFlakeIssues) EachLoop() error
- func (n *NagFlakeIssues) Initialize(config *mgh.Config, features *features.Features) error
- func (n *NagFlakeIssues) Munge(obj *mgh.MungeObject)
- func (NagFlakeIssues) Name() string
- func (NagFlakeIssues) RegisterOptions(opts *options.Options) sets.String
- func (NagFlakeIssues) RequiredFeatures() []string
- func (n *NagFlakeIssues) StaleIssueComments(obj *mgh.MungeObject, issueComments []*github.IssueComment) []*github.IssueComment
- type NeedsRebaseMunger
- func (NeedsRebaseMunger) EachLoop() error
- func (NeedsRebaseMunger) Initialize(config *github.Config, features *features.Features) error
- func (NeedsRebaseMunger) Munge(obj *github.MungeObject)
- func (NeedsRebaseMunger) Name() string
- func (NeedsRebaseMunger) RegisterOptions(opts *options.Options) sets.String
- func (NeedsRebaseMunger) RequiredFeatures() []string
- func (n NeedsRebaseMunger) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
- type OldTestGetter
- func (p *OldTestGetter) EachLoop() error
- func (p *OldTestGetter) Initialize(config *github.Config, features *features.Features) error
- func (p *OldTestGetter) Munge(obj *github.MungeObject)
- func (p *OldTestGetter) Name() string
- func (p *OldTestGetter) RegisterOptions(opts *options.Options) sets.String
- func (p *OldTestGetter) RequiredFeatures() []string
- type OwnerLabelMunger
- func (b *OwnerLabelMunger) EachLoop() error
- func (b *OwnerLabelMunger) Initialize(config *github.Config, features *features.Features) error
- func (b *OwnerLabelMunger) Munge(obj *github.MungeObject)
- func (b *OwnerLabelMunger) Name() string
- func (b *OwnerLabelMunger) RegisterOptions(opts *options.Options) sets.String
- func (b *OwnerLabelMunger) RequiredFeatures() []string
- type PathLabelMunger
- func (p *PathLabelMunger) EachLoop() error
- func (p *PathLabelMunger) Initialize(config *github.Config, features *features.Features) error
- func (p *PathLabelMunger) Munge(obj *github.MungeObject)
- func (p *PathLabelMunger) Name() string
- func (p *PathLabelMunger) RegisterOptions(opts *options.Options) sets.String
- func (p *PathLabelMunger) RequiredFeatures() []string
- type PickMustHaveMilestone
- func (PickMustHaveMilestone) EachLoop() error
- func (PickMustHaveMilestone) Initialize(config *github.Config, features *features.Features) error
- func (PickMustHaveMilestone) Munge(obj *github.MungeObject)
- func (PickMustHaveMilestone) Name() string
- func (PickMustHaveMilestone) RegisterOptions(opts *options.Options) sets.String
- func (PickMustHaveMilestone) RequiredFeatures() []string
- func (p PickMustHaveMilestone) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
- type PublisherMunger
- func (p *PublisherMunger) EachLoop() error
- func (p *PublisherMunger) Initialize(config *github.Config, features *features.Features) error
- func (p *PublisherMunger) Munge(obj *github.MungeObject)
- func (p *PublisherMunger) Name() string
- func (p *PublisherMunger) RegisterOptions(opts *options.Options) sets.String
- func (p *PublisherMunger) RequiredFeatures() []string
- type SigMentionHandler
- func (*SigMentionHandler) EachLoop() error
- func (*SigMentionHandler) HasNeedsSigLabel(obj *github.MungeObject) bool
- func (*SigMentionHandler) HasSigLabel(obj *github.MungeObject) bool
- func (s *SigMentionHandler) Initialize(config *github.Config, features *features.Features) error
- func (s *SigMentionHandler) Munge(obj *github.MungeObject)
- func (*SigMentionHandler) Name() string
- func (*SigMentionHandler) RegisterOptions(opts *options.Options) sets.String
- func (*SigMentionHandler) RequiredFeatures() []string
- type StaleGreenCI
- func (s *StaleGreenCI) EachLoop() error
- func (s *StaleGreenCI) Initialize(config *github.Config, features *features.Features) error
- func (s *StaleGreenCI) Munge(obj *github.MungeObject)
- func (s *StaleGreenCI) Name() string
- func (s *StaleGreenCI) RegisterOptions(opts *options.Options) sets.String
- func (s *StaleGreenCI) RequiredFeatures() []string
- func (s *StaleGreenCI) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
- type StaleIssueComment
- type StalePendingCI
- func (s *StalePendingCI) EachLoop() error
- func (s *StalePendingCI) Initialize(config *github.Config, features *features.Features) error
- func (s *StalePendingCI) Munge(obj *github.MungeObject)
- func (s *StalePendingCI) Name() string
- func (s *StalePendingCI) RegisterOptions(opts *options.Options) sets.String
- func (s *StalePendingCI) RequiredFeatures() []string
- func (s *StalePendingCI) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
- type SubmitQueue
- func (sq *SubmitQueue) EachLoop() error
- func (sq *SubmitQueue) EmergencyStopHTTP(res http.ResponseWriter, req *http.Request)
- func (sq *SubmitQueue) Initialize(config *github.Config, features *features.Features) error
- func (sq *SubmitQueue) Munge(obj *github.MungeObject)
- func (sq *SubmitQueue) Name() string
- func (sq *SubmitQueue) RegisterOptions(opts *options.Options) sets.String
- func (sq *SubmitQueue) RequiredFeatures() []string
- func (sq *SubmitQueue) SetMergeStatus(obj *github.MungeObject, reason string)
- func (sq *SubmitQueue) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
Constants ¶
const ( NOTIFNAME = "INACTIVE-PULL-REQUEST" CREATIONTIMECAP = 36 * 30 * 24 * time.Hour //period since PR creation time COMMENTTIMECAP = 7 * 24 * time.Hour //period since last IssueComment and PullRequestComment being posted REMINDERNUMCAP = 5 //maximum number of times this munger will post reminder IssueComment LEAFOWNERSONLY = false //setting for Blunderbuss to fetch only leaf owners or all owners )
Variables ¶
var AssociatedIssueRegex = regexp.MustCompile(`(?:kubernetes/[^/]+/issues/|#)(\d+)`)
Functions ¶
func EachLoop ¶
func EachLoop() error
EachLoop will be called before we start a poll loop and will run the EachLoop function for all active mungers
func InitializeMungers ¶
InitializeMungers will call munger.Initialize() for the requested mungers.
func MungeIssue ¶
func MungeIssue(obj *github.MungeObject) error
MungeIssue will call each activated munger with the given object
func NewPublisherLog ¶
func RegisterMunger ¶
RegisterMunger should be called in `init()` by each munger to make itself available by name
func RegisterMungerOrDie ¶
func RegisterMungerOrDie(munger Munger)
RegisterMungerOrDie will call RegisterMunger but will be fatal on error
func RegisterMungers ¶
RegisterMungers will check if a requested munger exists and add it to the list.
func RegisterStaleIssueComments ¶
func RegisterStaleIssueComments(s StaleIssueComment)
RegisterStaleIssueComments is the method for a munger to register that it creates issue comments which might go stale and need to be cleaned up.
func RequestedFeatures ¶
func RequestedFeatures() []string
RequestedFeatures returns a list of all feature which should be enabled for the running mungers
func SyncLabels ¶
func SyncLabels(allLabels, desiredLabels sets.String, obj *github.MungeObject) error
SyncLabels properly syncs a set of labels. 'allLabels' must be a superset of 'desiredLabels'; to disable removing labels, set them to be the same set. Multiple mungers must somehow coordinate on which labels the bot ought to apply, otherwise the bot will fight with itself.
TODO: fix error handling.
Types ¶
type ApprovalHandler ¶
type ApprovalHandler struct {
// contains filtered or unexported fields
}
ApprovalHandler will try to add "approved" label once all files of change has been approved by approvers.
func (*ApprovalHandler) EachLoop ¶
func (*ApprovalHandler) EachLoop() error
EachLoop is called at the start of every munge loop
func (*ApprovalHandler) Initialize ¶
Initialize will initialize the munger
func (*ApprovalHandler) Munge ¶
func (h *ApprovalHandler) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR The algorithm goes as: - Initially, we build an approverSet
- Go through all comments in order of creation.
- (Issue/PR comments, PR review comments, and PR review bodies are considered as comments)
- If anyone said "/approve" or "/lgtm", add them to approverSet.
- Then, for each file, we see if any approver of this file is in approverSet and keep track of files without approval
- An approver of a file is defined as:
- Someone listed as an "approver" in an OWNERS file in the files directory OR
- in one of the file's parent directorie
- Iff all files have been approved, the bot will add the "approved" label.
- Iff a cancel command is found, that reviewer will be removed from the approverSet and the munger will remove the approved label if it has been applied
func (*ApprovalHandler) Name ¶
func (*ApprovalHandler) Name() string
Name is the name usable in --pr-mungers
func (*ApprovalHandler) RegisterOptions ¶
func (h *ApprovalHandler) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*ApprovalHandler) RequiredFeatures ¶
func (*ApprovalHandler) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
type AssignFixesMunger ¶
type AssignFixesMunger struct {
// contains filtered or unexported fields
}
AssignFixesMunger will assign issues to users based on the config file provided by --assignfixes-config.
func (*AssignFixesMunger) EachLoop ¶
func (a *AssignFixesMunger) EachLoop() error
EachLoop is called at the start of every munge loop
func (*AssignFixesMunger) Initialize ¶
Initialize will initialize the munger
func (*AssignFixesMunger) Munge ¶
func (a *AssignFixesMunger) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (*AssignFixesMunger) Name ¶
func (a *AssignFixesMunger) Name() string
Name is the name usable in --pr-mungers
func (*AssignFixesMunger) RegisterOptions ¶
func (a *AssignFixesMunger) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*AssignFixesMunger) RequiredFeatures ¶
func (a *AssignFixesMunger) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
type Batch ¶
Batch represents a specific merge state: a base branch and SHA, and the SHAs of each PR merged into it.
type BlockPath ¶
type BlockPath struct {
// contains filtered or unexported fields
}
BlockPath will add a label to block auto merge if a PR touches certain paths
func (*BlockPath) Initialize ¶
Initialize will initialize the munger
func (*BlockPath) Munge ¶
func (b *BlockPath) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (*BlockPath) RegisterOptions ¶
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*BlockPath) RequiredFeatures ¶
RequiredFeatures is a slice of 'features' that must be provided
func (*BlockPath) StaleIssueComments ¶
func (b *BlockPath) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
StaleIssueComments returns a slice of stale issue comments.
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)
type BlunderbussMunger ¶
type BlunderbussMunger struct {
// contains filtered or unexported fields
}
BlunderbussMunger will assign issues to users based on the config file provided by --blunderbuss-config and/or OWNERS files.
func (*BlunderbussMunger) EachLoop ¶
func (b *BlunderbussMunger) EachLoop() error
EachLoop is called at the start of every munge loop
func (*BlunderbussMunger) Initialize ¶
Initialize will initialize the munger
func (*BlunderbussMunger) Munge ¶
func (b *BlunderbussMunger) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (*BlunderbussMunger) Name ¶
func (b *BlunderbussMunger) Name() string
Name is the name usable in --pr-mungers
func (*BlunderbussMunger) RegisterOptions ¶
func (b *BlunderbussMunger) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*BlunderbussMunger) RequiredFeatures ¶
func (b *BlunderbussMunger) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
type CheckLabelsMunger ¶
type CheckLabelsMunger struct {
// contains filtered or unexported fields
}
CheckLabelsMunger will check that the labels specified in the labels yaml file are created.
func (*CheckLabelsMunger) EachLoop ¶
func (c *CheckLabelsMunger) EachLoop() error
EachLoop is called at the start of every munge loop
func (*CheckLabelsMunger) Initialize ¶
func (c *CheckLabelsMunger) Initialize(config *githubhelper.Config, features *features.Features) error
Initialize will initialize the munger.
func (*CheckLabelsMunger) Munge ¶
func (c *CheckLabelsMunger) Munge(obj *githubhelper.MungeObject)
Munge is unused by this munger.
func (*CheckLabelsMunger) Name ¶
func (c *CheckLabelsMunger) Name() string
Name is the name usable in --pr-mungers
func (*CheckLabelsMunger) RegisterOptions ¶
func (c *CheckLabelsMunger) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*CheckLabelsMunger) RequiredFeatures ¶
func (c *CheckLabelsMunger) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided.
type CherrypickAutoApprove ¶
type CherrypickAutoApprove struct {
// contains filtered or unexported fields
}
CherrypickAutoApprove will add 'cherrypick-approved' to PRs which are for 'cherrypick-approved' parents. This only works if the PR (against the 'release-*' branch was done using the script.
func (*CherrypickAutoApprove) EachLoop ¶
func (c *CherrypickAutoApprove) EachLoop() error
EachLoop is called at the start of every munge loop
func (*CherrypickAutoApprove) Initialize ¶
func (c *CherrypickAutoApprove) Initialize(config *github.Config, features *features.Features) error
Initialize will initialize the munger
func (*CherrypickAutoApprove) Munge ¶
func (c *CherrypickAutoApprove) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (*CherrypickAutoApprove) Name ¶
func (c *CherrypickAutoApprove) Name() string
Name is the name usable in --pr-mungers
func (*CherrypickAutoApprove) RegisterOptions ¶
func (c *CherrypickAutoApprove) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*CherrypickAutoApprove) RequiredFeatures ¶
func (c *CherrypickAutoApprove) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
type CherrypickQueue ¶
CherrypickQueue will merge PR which meet a set of requirements.
func (*CherrypickQueue) EachLoop ¶
func (c *CherrypickQueue) EachLoop() error
EachLoop is called at the start of every munge loop
func (*CherrypickQueue) Initialize ¶
Initialize will initialize the munger
func (*CherrypickQueue) Munge ¶
func (c *CherrypickQueue) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (*CherrypickQueue) Name ¶
func (c *CherrypickQueue) Name() string
Name is the name usable in --pr-mungers
func (*CherrypickQueue) RegisterOptions ¶
func (c *CherrypickQueue) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*CherrypickQueue) RequiredFeatures ¶
func (c *CherrypickQueue) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
type ClearPickAfterMerge ¶
type ClearPickAfterMerge struct {
// contains filtered or unexported fields
}
ClearPickAfterMerge will remove the the cherrypick-candidate label from any PR that does not have a 'release' milestone set.
func (*ClearPickAfterMerge) EachLoop ¶
func (c *ClearPickAfterMerge) EachLoop() error
EachLoop is called at the start of every munge loop
func (*ClearPickAfterMerge) Initialize ¶
Initialize will initialize the munger
func (*ClearPickAfterMerge) Munge ¶
func (c *ClearPickAfterMerge) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (*ClearPickAfterMerge) Name ¶
func (c *ClearPickAfterMerge) Name() string
Name is the name usable in --pr-mungers
func (*ClearPickAfterMerge) RegisterOptions ¶
func (c *ClearPickAfterMerge) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*ClearPickAfterMerge) RequiredFeatures ¶
func (c *ClearPickAfterMerge) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
type CloseStale ¶
type CloseStale struct{}
CloseStale will ask the Bot to close any PR/Issue that didn't have any human interactions in `stalePeriod` duration.
This is done by checking both review and issue comments, and by ignoring comments done with a bot name. We also consider re-open on the PR/Issue.
func (CloseStale) EachLoop ¶
func (CloseStale) EachLoop() error
EachLoop is called at the start of every munge loop
func (CloseStale) Initialize ¶
Initialize will initialize the munger
func (CloseStale) Munge ¶
func (CloseStale) Munge(obj *github.MungeObject)
Munge is the workhorse that will actually close the PRs/Issues
func (CloseStale) RegisterOptions ¶
func (CloseStale) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (CloseStale) RequiredFeatures ¶
func (CloseStale) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
func (CloseStale) StaleIssueComments ¶
func (s CloseStale) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
StaleIssueComments returns a slice of stale issue comments.
type CommentDeleter ¶
type CommentDeleter struct{}
CommentDeleter looks for comments which are no longer useful and deletes them
func (CommentDeleter) EachLoop ¶
func (CommentDeleter) EachLoop() error
EachLoop is called at the start of every munge loop
func (CommentDeleter) Initialize ¶
Initialize will initialize the munger
func (CommentDeleter) Munge ¶
func (CommentDeleter) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (CommentDeleter) Name ¶
func (CommentDeleter) Name() string
Name is the name usable in --pr-mungers
func (CommentDeleter) RegisterOptions ¶
func (CommentDeleter) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (CommentDeleter) RequiredFeatures ¶
func (CommentDeleter) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
type CommentDeleterJenkins ¶
type CommentDeleterJenkins struct{}
CommentDeleterJenkins looks for jenkins comments which are no longer useful and deletes them
func (CommentDeleterJenkins) StaleIssueComments ¶
func (CommentDeleterJenkins) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
StaleIssueComments returns a slice of stale issue comments.
type DocsNeedNoRetest ¶
type DocsNeedNoRetest struct{}
DocsNeedNoRetest automatically labels documentation only pull-requests as retest-not-required
func (DocsNeedNoRetest) EachLoop ¶
func (DocsNeedNoRetest) EachLoop() error
EachLoop is called at the start of every munge loop
func (*DocsNeedNoRetest) Initialize ¶
Initialize will initialize the munger
func (DocsNeedNoRetest) Munge ¶
func (DocsNeedNoRetest) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (DocsNeedNoRetest) Name ¶
func (DocsNeedNoRetest) Name() string
Name is the name usable in --pr-mungers
func (DocsNeedNoRetest) RegisterOptions ¶
func (DocsNeedNoRetest) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (DocsNeedNoRetest) RequiredFeatures ¶
func (DocsNeedNoRetest) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
type InactiveReviewHandler ¶
type InactiveReviewHandler struct {
// contains filtered or unexported fields
}
func (*InactiveReviewHandler) EachLoop ¶
func (i *InactiveReviewHandler) EachLoop() error
EachLoop is called at the start of every munge loop
func (*InactiveReviewHandler) Initialize ¶
func (*InactiveReviewHandler) Munge ¶
func (i *InactiveReviewHandler) Munge(obj *github.MungeObject)
Munge is the workhorse encouraging PR author to assign a new reviewer after getting no response from current reviewer for "COMMENTTIMECAP" duration The algorithm: (1) find latest comment posting time (2) if the time is "COMMENTTIMECAP" or longer before today's time, create a comment
encouraging the author to assign a new reviewer and unassign the old reviewer
(3) suggest the new reviewer using Blunderbuss algorithm, making sure the old reviewer is not suggested Note: the munger will post at most "REMINDERNUMCAP" number of times
func (*InactiveReviewHandler) Name ¶
func (i *InactiveReviewHandler) Name() string
func (*InactiveReviewHandler) RegisterOptions ¶
func (*InactiveReviewHandler) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*InactiveReviewHandler) RequiredFeatures ¶
func (i *InactiveReviewHandler) RequiredFeatures() []string
type LGTMAfterCommitMunger ¶
type LGTMAfterCommitMunger struct{}
LGTMAfterCommitMunger will remove the LGTM flag from an PR which has been updated since the reviewer added LGTM
func (LGTMAfterCommitMunger) EachLoop ¶
func (LGTMAfterCommitMunger) EachLoop() error
EachLoop is called at the start of every munge loop
func (LGTMAfterCommitMunger) Initialize ¶
Initialize will initialize the munger
func (LGTMAfterCommitMunger) Munge ¶
func (LGTMAfterCommitMunger) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (LGTMAfterCommitMunger) Name ¶
func (LGTMAfterCommitMunger) Name() string
Name is the name usable in --pr-mungers
func (LGTMAfterCommitMunger) RegisterOptions ¶
func (LGTMAfterCommitMunger) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (LGTMAfterCommitMunger) RequiredFeatures ¶
func (LGTMAfterCommitMunger) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
func (LGTMAfterCommitMunger) StaleIssueComments ¶
func (l LGTMAfterCommitMunger) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
StaleIssueComments returns a list of stale issue comments.
type LabelMunger ¶
type LabelMunger struct {
// contains filtered or unexported fields
}
LabelMunger will update a label on a PR based on how many lines are changed. It will exclude certain files in it's calculations based on the config file provided in --generated-files-config
func (*LabelMunger) EachLoop ¶
func (*LabelMunger) EachLoop() error
EachLoop is called at the start of every munge loop
func (*LabelMunger) Initialize ¶
Initialize will initialize the munger
func (*LabelMunger) Munge ¶
func (lm *LabelMunger) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (*LabelMunger) Name ¶
func (*LabelMunger) Name() string
Name is the name usable in --pr-mungers
func (*LabelMunger) RegisterOptions ¶
func (lm *LabelMunger) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*LabelMunger) RequiredFeatures ¶
func (*LabelMunger) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
type LabelUnapprovedPicks ¶
type LabelUnapprovedPicks struct{}
LabelUnapprovedPicks will add `do-not-merge` to PRs against a release branch which do not have `cherrypick-approved`.
func (LabelUnapprovedPicks) EachLoop ¶
func (LabelUnapprovedPicks) EachLoop() error
EachLoop is called at the start of every munge loop
func (LabelUnapprovedPicks) Initialize ¶
Initialize will initialize the munger
func (LabelUnapprovedPicks) Munge ¶
func (LabelUnapprovedPicks) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (LabelUnapprovedPicks) Name ¶
func (LabelUnapprovedPicks) Name() string
Name is the name usable in --pr-mungers
func (LabelUnapprovedPicks) RegisterOptions ¶
func (LabelUnapprovedPicks) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (LabelUnapprovedPicks) RequiredFeatures ¶
func (LabelUnapprovedPicks) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
func (LabelUnapprovedPicks) StaleIssueComments ¶
func (l LabelUnapprovedPicks) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
StaleIssueComments returns a list of stale issue comments.
type MilestoneMaintainer ¶
type MilestoneMaintainer struct {
// contains filtered or unexported fields
}
MilestoneMaintainer enforces the process for shepherding issues into the release.
func NewMilestoneMaintainer ¶
func NewMilestoneMaintainer() *MilestoneMaintainer
func (*MilestoneMaintainer) EachLoop ¶
func (m *MilestoneMaintainer) EachLoop() error
EachLoop is called at the start of every munge loop. This function is a no-op for the munger because to munge an issue it only needs the state local to the issue.
func (*MilestoneMaintainer) Initialize ¶
Initialize will initialize the munger
func (*MilestoneMaintainer) Munge ¶
func (m *MilestoneMaintainer) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the issue
func (*MilestoneMaintainer) Name ¶
func (m *MilestoneMaintainer) Name() string
Name is the name usable in --pr-mungers
func (*MilestoneMaintainer) RegisterOptions ¶
func (m *MilestoneMaintainer) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*MilestoneMaintainer) RequiredFeatures ¶
func (m *MilestoneMaintainer) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
type Munger ¶
type Munger interface { // Take action on a specific github issue: Munge(obj *github.MungeObject) RegisterOptions(opts *options.Options) sets.String Name() string RequiredFeatures() []string Initialize(*github.Config, *features.Features) error EachLoop() error }
Munger is the interface which all mungers must implement to register
func GetActiveMungers ¶
func GetActiveMungers() []Munger
GetActiveMungers returns a slice of all mungers which both registered and were requested by the user
func GetAllMungers ¶
func GetAllMungers() []Munger
GetAllMungers returns a slice of all registered mungers. This list is completely independent of the mungers selected at runtime in --pr-mungers. This is all possible mungers.
type NagFlakeIssues ¶
type NagFlakeIssues struct {
// contains filtered or unexported fields
}
NagFlakeIssues pings assignees on flaky-test issues
func (NagFlakeIssues) EachLoop ¶
func (NagFlakeIssues) EachLoop() error
EachLoop is called at the start of every munge loop
func (*NagFlakeIssues) Initialize ¶
Initialize will initialize the munger
func (*NagFlakeIssues) Munge ¶
func (n *NagFlakeIssues) Munge(obj *mgh.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (NagFlakeIssues) Name ¶
func (NagFlakeIssues) Name() string
Name is the name usable in --pr-mungers
func (NagFlakeIssues) RegisterOptions ¶
func (NagFlakeIssues) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (NagFlakeIssues) RequiredFeatures ¶
func (NagFlakeIssues) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
func (*NagFlakeIssues) StaleIssueComments ¶
func (n *NagFlakeIssues) StaleIssueComments(obj *mgh.MungeObject, issueComments []*github.IssueComment) []*github.IssueComment
StaleIssueComments returns a slice of stale issue comments.
type NeedsRebaseMunger ¶
type NeedsRebaseMunger struct{}
NeedsRebaseMunger will add the "needs-rebase" label to any issue which is unable to be automatically merged
func (NeedsRebaseMunger) EachLoop ¶
func (NeedsRebaseMunger) EachLoop() error
EachLoop is called at the start of every munge loop
func (NeedsRebaseMunger) Initialize ¶
Initialize will initialize the munger
func (NeedsRebaseMunger) Munge ¶
func (NeedsRebaseMunger) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (NeedsRebaseMunger) Name ¶
func (NeedsRebaseMunger) Name() string
Name is the name usable in --pr-mungers
func (NeedsRebaseMunger) RegisterOptions ¶
func (NeedsRebaseMunger) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (NeedsRebaseMunger) RequiredFeatures ¶
func (NeedsRebaseMunger) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
func (NeedsRebaseMunger) StaleIssueComments ¶
func (n NeedsRebaseMunger) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
StaleIssueComments returns a slice of stale issue comments.
type OldTestGetter ¶
type OldTestGetter struct {
// contains filtered or unexported fields
}
OldTestGetter files issues for flaky tests.
func (*OldTestGetter) EachLoop ¶
func (p *OldTestGetter) EachLoop() error
EachLoop is called at the start of every munge loop
func (*OldTestGetter) Initialize ¶
Initialize will initialize the munger
func (*OldTestGetter) Munge ¶
func (p *OldTestGetter) Munge(obj *github.MungeObject)
Munge is unused by this munger.
func (*OldTestGetter) Name ¶
func (p *OldTestGetter) Name() string
Name is the name usable in --pr-mungers
func (*OldTestGetter) RegisterOptions ¶
func (p *OldTestGetter) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*OldTestGetter) RequiredFeatures ¶
func (p *OldTestGetter) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
type OwnerLabelMunger ¶
type OwnerLabelMunger struct {
// contains filtered or unexported fields
}
OwnerLabelMunger will label issues as specified in OWNERS files.
func (*OwnerLabelMunger) EachLoop ¶
func (b *OwnerLabelMunger) EachLoop() error
EachLoop is called at the start of every munge loop
func (*OwnerLabelMunger) Initialize ¶
Initialize will initialize the munger
func (*OwnerLabelMunger) Munge ¶
func (b *OwnerLabelMunger) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (*OwnerLabelMunger) Name ¶
func (b *OwnerLabelMunger) Name() string
Name is the name usable in --pr-mungers
func (*OwnerLabelMunger) RegisterOptions ¶
func (b *OwnerLabelMunger) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*OwnerLabelMunger) RequiredFeatures ¶
func (b *OwnerLabelMunger) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
type PathLabelMunger ¶
type PathLabelMunger struct {
// contains filtered or unexported fields
}
PathLabelMunger will add labels to PRs based on what files it modified. The mapping of files to labels if provided in a file in --path-label-config
func (*PathLabelMunger) EachLoop ¶
func (p *PathLabelMunger) EachLoop() error
EachLoop is called at the start of every munge loop
func (*PathLabelMunger) Initialize ¶
Initialize will initialize the munger
func (*PathLabelMunger) Munge ¶
func (p *PathLabelMunger) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (*PathLabelMunger) Name ¶
func (p *PathLabelMunger) Name() string
Name is the name usable in --pr-mungers
func (*PathLabelMunger) RegisterOptions ¶
func (p *PathLabelMunger) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*PathLabelMunger) RequiredFeatures ¶
func (p *PathLabelMunger) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
type PickMustHaveMilestone ¶
type PickMustHaveMilestone struct{}
PickMustHaveMilestone will remove the the cherrypick-candidate label from any PR that does not have a 'release' milestone set.
func (PickMustHaveMilestone) EachLoop ¶
func (PickMustHaveMilestone) EachLoop() error
EachLoop is called at the start of every munge loop
func (PickMustHaveMilestone) Initialize ¶
Initialize will initialize the munger
func (PickMustHaveMilestone) Munge ¶
func (PickMustHaveMilestone) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (PickMustHaveMilestone) Name ¶
func (PickMustHaveMilestone) Name() string
Name is the name usable in --pr-mungers
func (PickMustHaveMilestone) RegisterOptions ¶
func (PickMustHaveMilestone) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (PickMustHaveMilestone) RequiredFeatures ¶
func (PickMustHaveMilestone) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
func (PickMustHaveMilestone) StaleIssueComments ¶
func (p PickMustHaveMilestone) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
StaleIssueComments returns a slice of stale issue comments.
type PublisherMunger ¶
type PublisherMunger struct {
// contains filtered or unexported fields
}
PublisherMunger publishes content from one repository to another one.
func (*PublisherMunger) EachLoop ¶
func (p *PublisherMunger) EachLoop() error
EachLoop is called at the start of every munge loop
func (*PublisherMunger) Initialize ¶
Initialize will initialize the munger
func (*PublisherMunger) Munge ¶
func (p *PublisherMunger) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (*PublisherMunger) Name ¶
func (p *PublisherMunger) Name() string
Name is the name usable in --pr-mungers
func (*PublisherMunger) RegisterOptions ¶
func (p *PublisherMunger) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*PublisherMunger) RequiredFeatures ¶
func (p *PublisherMunger) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
type SigMentionHandler ¶
type SigMentionHandler struct{}
func (*SigMentionHandler) EachLoop ¶
func (*SigMentionHandler) EachLoop() error
EachLoop is called at the start of every munge loop
func (*SigMentionHandler) HasNeedsSigLabel ¶
func (*SigMentionHandler) HasNeedsSigLabel(obj *github.MungeObject) bool
func (*SigMentionHandler) HasSigLabel ¶
func (*SigMentionHandler) HasSigLabel(obj *github.MungeObject) bool
func (*SigMentionHandler) Initialize ¶
Initialize will initialize the munger
func (*SigMentionHandler) Munge ¶
func (s *SigMentionHandler) Munge(obj *github.MungeObject)
Munge is the workhorse notifying issue owner to add a @kubernetes/sig mention if there is none The algorithm: (1) return if it is a PR and/or the issue is closed (2) find if the issue has a sig label (3) find if the issue has a needs-sig label (4) if the issue has both the sig and needs-sig labels, remove the needs-sig label (5) if the issue has none of the labels, add the needs-sig label and comment (6) if the issue has only the sig label, do nothing (7) if the issue has only the needs-sig label, do nothing
func (*SigMentionHandler) Name ¶
func (*SigMentionHandler) Name() string
Name is the name usable in --pr-mungers
func (*SigMentionHandler) RegisterOptions ¶
func (*SigMentionHandler) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*SigMentionHandler) RequiredFeatures ¶
func (*SigMentionHandler) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
type StaleGreenCI ¶
StaleGreenCI will re-run passed tests for LGTM PRs if they are more than 96 hours old.
func (*StaleGreenCI) EachLoop ¶
func (s *StaleGreenCI) EachLoop() error
EachLoop is called at the start of every munge loop
func (*StaleGreenCI) Initialize ¶
Initialize will initialize the munger
func (*StaleGreenCI) Munge ¶
func (s *StaleGreenCI) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (*StaleGreenCI) Name ¶
func (s *StaleGreenCI) Name() string
Name is the name usable in --pr-mungers
func (*StaleGreenCI) RegisterOptions ¶
func (s *StaleGreenCI) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*StaleGreenCI) RequiredFeatures ¶
func (s *StaleGreenCI) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
func (*StaleGreenCI) StaleIssueComments ¶
func (s *StaleGreenCI) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
StaleIssueComments returns a slice of stale issue comments.
type StaleIssueComment ¶
type StaleIssueComment interface {
StaleIssueComments(*github.MungeObject, []*githubapi.IssueComment) []*githubapi.IssueComment
}
StaleIssueComment is an interface for a munger which writes issue comments which might go stale and which should be cleaned up.
type StalePendingCI ¶
type StalePendingCI struct{}
StalePendingCI will ask the testBot-to test any PR with a LGTM that has been pending for more than 24 hours. This can happen when the jenkins VM is restarted.
The real fix would be for the jenkins VM restart to not move every single PR to pending without actually testing...
But this is our world and so we should really do this for all PRs which aren't likely to get another push (everything that is mergeable). Since that can be a lot of PRs, I'm just doing it for the LGTM PRs automatically...
func (*StalePendingCI) EachLoop ¶
func (s *StalePendingCI) EachLoop() error
EachLoop is called at the start of every munge loop
func (*StalePendingCI) Initialize ¶
Initialize will initialize the munger
func (*StalePendingCI) Munge ¶
func (s *StalePendingCI) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (*StalePendingCI) Name ¶
func (s *StalePendingCI) Name() string
Name is the name usable in --pr-mungers
func (*StalePendingCI) RegisterOptions ¶
func (s *StalePendingCI) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*StalePendingCI) RequiredFeatures ¶
func (s *StalePendingCI) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
func (*StalePendingCI) StaleIssueComments ¶
func (s *StalePendingCI) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
StaleIssueComments returns a slice of stale issue comments.
type SubmitQueue ¶
type SubmitQueue struct { NonBlockingJobNames []string GateApproved bool GateCLA bool GateGHReviewApproved bool GateGHReviewChangesRequested bool // AdditionalRequiredLabels is a set of additional labels required for merging // on top of the existing required ("lgtm", "approved", "cncf-cla: yes"). AdditionalRequiredLabels []string // If FakeE2E is true, don't try to connect to JenkinsHost, all jobs are passing. FakeE2E bool DoNotMergeMilestones []string Metadata submitQueueMetadata AdminPort int sync.Mutex ProwURL string // prow base page BatchEnabled bool ContextURL string // MergeToMasterMessage is an extra message when PR is merged to master branch, // it must not end in a period. MergeToMasterMessage string // contains filtered or unexported fields }
SubmitQueue will merge PR which meet a set of requirements.
PR must have LGTM after the last commit PR must have passed all github CI checks The google internal jenkins instance must be passing the BlockingJobNames e2e tests
func (*SubmitQueue) EachLoop ¶
func (sq *SubmitQueue) EachLoop() error
EachLoop is called at the start of every munge loop
func (*SubmitQueue) EmergencyStopHTTP ¶
func (sq *SubmitQueue) EmergencyStopHTTP(res http.ResponseWriter, req *http.Request)
EmergencyStopHTTP sets the emergency stop flag. It expects the path of req.URL to contain either "emergency/stop", "emergency/resume", or "emergency/status".
func (*SubmitQueue) Initialize ¶
Initialize will initialize the munger
func (*SubmitQueue) Munge ¶
func (sq *SubmitQueue) Munge(obj *github.MungeObject)
Munge is the workhorse the will actually make updates to the PR
func (*SubmitQueue) Name ¶
func (sq *SubmitQueue) Name() string
Name is the name usable in --pr-mungers
func (*SubmitQueue) RegisterOptions ¶
func (sq *SubmitQueue) RegisterOptions(opts *options.Options) sets.String
RegisterOptions registers options for this munger; returns any that require a restart when changed.
func (*SubmitQueue) RequiredFeatures ¶
func (sq *SubmitQueue) RequiredFeatures() []string
RequiredFeatures is a slice of 'features' that must be provided
func (*SubmitQueue) SetMergeStatus ¶
func (sq *SubmitQueue) SetMergeStatus(obj *github.MungeObject, reason string)
SetMergeStatus will set the status given a particular PR. This function should be used instead of manipulating the prStatus directly as sq.Lock() must be called when manipulating that structure `obj` is the active github object `reason` is the new 'status' for this object
func (*SubmitQueue) StaleIssueComments ¶
func (sq *SubmitQueue) StaleIssueComments(obj *github.MungeObject, comments []*githubapi.IssueComment) []*githubapi.IssueComment
StaleIssueComments returns a slice of stale issue comments.
Source Files ¶
- approval-handler.go
- assign-fixes.go
- block_paths.go
- blunderbuss.go
- check-labels.go
- cherrypick-auto-approve.go
- cherrypick-clear-after-merge.go
- cherrypick-label-unapproved.go
- cherrypick-must-have-milestone.go
- cherrypick-queue.go
- close-stale.go
- comment-deleter-jenkins.go
- comment-deleter.go
- doc.go
- docs-no-retest.go
- inactive-review-handler.go
- issue-categorizer.go
- lgtm_after_commit.go
- milestone-maintainer.go
- mungers.go
- nag-flake-issues.go
- needs_rebase.go
- old-test-getter.go
- owner-label.go
- path_label.go
- prow.go
- publisher.go
- publisher_logger.go
- sig-mention-handler.go
- stale-green-ci.go
- stale-pending-ci.go
- submit-queue-batch.go
- submit-queue.go