cmd

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 21 Imported by: 0

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 AddWardenFileFlag added in v0.3.0

func AddWardenFileFlag(cmd *cobra.Command)

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately.

Types

type LicenseRule added in v0.2.0

type LicenseRule struct {
	Scope string   `yaml:"scope"`
	Names []string `yaml:"names"`
}

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

type Rule

type Rule struct {
	Repos          []string         `yaml:"repositories"`
	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 RuleError

type RuleError struct {
	// contains filtered or unexported fields
}

func (*RuleError) Error

func (re *RuleError) Error() string

type UserPermission

type UserPermission struct {
	Username   string `yaml:"user"`
	Permission string `yaml:"permission"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL