Documentation ¶
Index ¶
Constants ¶
View Source
const ( // BotName is the name of merge-bot BotName = "k8s-merge-robot" // JenkinsBotName is the name of kubekins bot JenkinsBotName = "k8s-bot" // PriorityP0 represents Priority P0 PriorityP0 = Priority(0) // PriorityP1 represents Priority P1 PriorityP1 = Priority(1) // PriorityP2 represents Priority P2 PriorityP2 = Priority(2) // PriorityP3 represents Priority P3 PriorityP3 = Priority(3) )
Variables ¶
View Source
var RobotUser = sets.NewString(JenkinsBotName, BotName)
RobotUser is a set of name of robot user
Functions ¶
This section is empty.
Types ¶
type IssueFinder ¶
IssueFinder finds an issue for a given key.
type IssueSource ¶
type IssueSource interface { // Title is used to identify issues, so you must never change the // mechanism or you'll get duplicates. Title() string // If ID() is found in either the body of the issue or the body of any // of its comments, then a new comment doesn't need to be made. A URL // to more details is a good choice. // Additionally, ID is used to tell if we've already successfully // synced a given source. So it must be unique for every source. ID() string // If a new issue or comment must be made, Body is called to get the // text. Body *must* contain the output of ID(). // newIssue will be true if we are starting a new issue, otherwise we // are adding a comment to an existing issue. Body(newIssue bool) string // If an issue is filed, these labels will be applied. Labels() []string // Priority calculates and returns the priority of an flake issue Priority(obj *github.MungeObject) (Priority, error) }
IssueSource can be implemented by anything that wishes to be synced with github issues.
type IssueSyncer ¶
type IssueSyncer struct {
// contains filtered or unexported fields
}
IssueSyncer implements robust issue syncing logic and won't file duplicates etc.
func NewIssueSyncer ¶
func NewIssueSyncer(config *github.Config, finder IssueFinder, owner OwnerMapper) *IssueSyncer
NewIssueSyncer constructs an issue syncer.
func (*IssueSyncer) Sync ¶
func (s *IssueSyncer) Sync(source IssueSource) error
Sync syncs the issue. It is fine and cheap to call Sync repeatedly for the same source.
type OwnerMapper ¶
type OwnerMapper interface { // TestOwner returns a GitHub username for a test, or "" if none are found. TestOwner(testName string) string }
OwnerMapper finds an owner for a given test name.
Click to show internal directories.
Click to hide internal directories.