Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortConfig ¶
func SortConfig(cfg *Config)
Types ¶
type CodeReviewAssignment ¶
type CodeReviewAssignment struct {
// Algorithm can only be LOAD_BALANCE or ROUND_ROBIN.
Algorithm TeamReviewAssignmentAlgorithm `json:"algorithm,omitempty" yaml:"algorithm,omitempty"`
// Enabled should be set to true if the CRA is enabled.
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
// ExcludedMembers contains the list of members that should not receive
// review requests.
ExcludedMembers []ExcludedMember `json:"excludedMembers,omitempty" yaml:"excludedMembers,omitempty"`
// NotifyTeam will notify the entire team if assigning team members.
NotifyTeam bool `json:"notifyTeam,omitempty" yaml:"notifyTeam,omitempty"`
// TeamMemberCount specifies the number of team members that should be
// assigned to review.
TeamMemberCount int `json:"teamMemberCount,omitempty" yaml:"teamMemberCount,omitempty"`
}
type Config ¶
type Config struct {
// Organization being managed.
Organization string `json:"organization,omitempty" yaml:"organization,omitempty"`
// Members maps the github login to a User.
Members map[string]User `json:"members,omitempty" yaml:"members,omitempty"`
// Teams maps the github team name to a TeamConfig.
Teams map[string]TeamConfig `json:"teams,omitempty" yaml:"teams,omitempty"`
// Slice of github logins that should be excluded from all team reviews
// assignments.
ExcludeCRAFromAllTeams []string `json:"excludeCodeReviewAssignmentFromAllTeams,omitempty" yaml:"excludeCodeReviewAssignmentFromAllTeams,omitempty"`
}
type ExcludedMember ¶
type TeamConfig ¶
type TeamConfig struct {
// ID is the GitHub ID of this team.
ID string `json:"id" yaml:"id"`
// Members is a list of users that belong to this team.
Members []string `json:"members,omitempty" yaml:"members,omitempty"`
// CodeReviewAssignment is the code review assignment configuration of this team
CodeReviewAssignment CodeReviewAssignment `json:"codeReviewAssignment,omitempty" yaml:"codeReviewAssignment,omitempty"`
}
type TeamReviewAssignmentAlgorithm ¶
type TeamReviewAssignmentAlgorithm string
const ( TeamReviewAssignmentAlgorithmLoadBalance TeamReviewAssignmentAlgorithm = "LOAD_BALANCE" TeamReviewAssignmentAlgorithmRoundRobin TeamReviewAssignmentAlgorithm = "ROUND_ROBIN" )
Click to show internal directories.
Click to hide internal directories.