Documentation
¶
Index ¶
Constants ¶
View Source
const ( ERR_DEFAULT_BRANCH = "The repository %s has an incorrect default branch." ERR_LICENSE = "The repository %s has an incorrect license." ERR_LABEL_MISSING = "The repository %s is missing the label %s." ERR_LABEL_EXTRA = "The repository %s has an extra label." ERR_ACCESS_MISSING = "The repository %s doesn't have the user." ERR_ACCESS_WRONG = "The repository %s's user's permission is incorrect." )
Variables ¶
This section is empty.
Functions ¶
func AddPolicyFileFlag ¶ added in v0.5.0
func AddRepositoriesFileFlag ¶ added in v0.5.0
Types ¶
type LicenseRule ¶ added in v0.2.0
type PolicyFile ¶ added in v0.5.0
type PolicyFile struct {
DefaultBranch string `yaml:"defaultBranch"`
Archived bool `yaml:"archived"` // include archived repos in lookup?
License *LicenseRule `yaml:"license"`
Labels []string `yaml:"labels"`
LabelStrategy string `yaml:"labelStrategy"`
Access []UserPermission `yaml:"access"`
AccessStrategy string `yaml:"accessStrategy"`
}
type RepositoriesFile ¶ added in v0.6.0
type RepositoriesFile []*RepositoryGroup
============================================================================= A repositories.yml file =============================================================================
func (RepositoriesFile) Group ¶ added in v0.6.0
func (this RepositoriesFile) Group(groupName string) (*RepositoryGroup, error)
Get a group from a repositories file.
func (*RepositoriesFile) RepositoriesByGroup ¶ added in v0.6.0
func (this *RepositoriesFile) RepositoriesByGroup(group string) []RepositoryDefinition
Gets repositories from a repositories.yml file by group. The only group supported at this time is 'all'.
type RepositoryDefinition ¶ added in v0.5.0
type RepositoryGroup ¶ added in v0.6.0
type RepositoryGroup struct {
Group string `yaml:"group"`
Repositories []RepositoryDefinition `yaml:"repositories"`
Children RepositoriesFile `yaml:"children,omitempty"`
}
============================================================================= A list of repositories belonging to a group, the top-level object in a repositories.yml file. =============================================================================
func (*RepositoryGroup) Add ¶ added in v0.6.0
func (this *RepositoryGroup) Add(repoDef RepositoryDefinition)
Add a repository to the group
func (*RepositoryGroup) HasChildren ¶ added in v0.6.0
func (this *RepositoryGroup) HasChildren() bool
type UserPermission ¶
Click to show internal directories.
Click to hide internal directories.