cmd

package
v0.0.0-...-4551d9b Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: CC0-1.0 Imports: 36 Imported by: 0

Documentation

Overview

This file contains common functions that are shared in the lab package

Index

Constants

This section is empty.

Variables

View Source
var BLUE = color.New(color.BgBlue).SprintFunc()
View Source
var (
	CommandPrefix string
)
View Source
var Version string

Functions

func Execute

func Execute(initSkipped bool)

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func MapLabels

func MapLabels(rn string, labelTerms []string) ([]string, error)

Types

type BZCustomFields

type BZCustomFields struct {
	Bugs []BZdataCF `json:"bugs"`
}

type BZRule

type BZRule struct {
	Error  BZRuleError    `json:"error,omitempty"`
	Id     string         `json:"id,omitempty"`
	Result []BZRuleResult `json:"result,omitempty"`
}

type BZRuleActionJson

type BZRuleActionJson struct {
	FlagTypes BZRuleActionJsonFlagTypes `json:"flag_types,omitempty"`
}

type BZRuleActionJsonFlagTypes

type BZRuleActionJsonFlagTypes struct {
	Release BZRuleActionJsonFlagTypesRelease `json:"release,omitempty"`
}

type BZRuleActionJsonFlagTypesRelease

type BZRuleActionJsonFlagTypesRelease struct {
	Status    string `json:"status,omitempty"`
	Ignore    int    `json:"ignore,omitempty"`
	Condition string `json:"condition,omitempty"`
}

type BZRuleDetails

type BZRuleDetails struct {
	MatchJson  BZRuleMatchJson  `json:"match_json,omitempty"`
	ActionJson BZRuleActionJson `json:"action_json,omitempty"`
}

type BZRuleError

type BZRuleError struct {
	Code    int    `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

type BZRuleMatchJson

type BZRuleMatchJson struct {
	BugStatus               BZRuleMatchWordAndValues   `json:"bug_status,omitempty"`
	InternalTargetMilestone BZRuleMatchWordAndValues   `json:"cf_internal_target_milestone,omitempty"`
	InternalTargetRelease   BZRuleMatchWordAndValues   `json:"cf_internal_target_release,omitempty"`
	Classification          BZRuleMatchWordAndValues   `json:"classification,omitempty"`
	Product                 BZRuleMatchWordAndValues   `json:"product,omitempty"`
	FlagTypes               []BZRuleMatchStatusAndName `json:"flag_types,omitempty"`
}

type BZRuleMatchStatusAndName

type BZRuleMatchStatusAndName struct {
	Status []string `json:"status,omitempty"`
	Name   string   `json:"name,omitempty"`
}

type BZRuleMatchWordAndValues

type BZRuleMatchWordAndValues struct {
	Word   string   `json:"word,omitempty"`
	Values []string `json:"values,omitempty"`
}

type BZRuleQuery

type BZRuleQuery struct {
	Bugzilla_api_key string `json:"Bugzilla_api_key"`
	Names            string `json:"names"`
}

type BZRuleResult

type BZRuleResult struct {
	Usage_7days    int      `json:"usage_7days,omitempty"`
	Usage_24hrs    int      `json:"usage24hrs,omitempty"`
	Definition     string   `json:"definition,omitempty"`
	Owners         []string `json:"owners,omitempty"`
	BZRuleGroupId  int      `json:"rule_group_id,omitempty"`
	UseSinceChange int      `json:"use_since_change,omitempty"`
	MinorUpdate    bool     `json:"minor_update,omitempty"`
	Id             int      `json:"id,omitempty"`

	Name         string        `json:"name,omitempty"`
	LastModified string        `json:"last_modified,omitempty"`
	Description  string        `json:"description,omitempty"`
	Details      BZRuleDetails `json:"details,omitempty"`
	IsPeriodic   bool          `json:"is_periodic,omitempty"`
	IsActive     bool          `json:"is_active,omitempty"`
	LastUsed     string        `json:"last_used,omitempty"`
	// contains filtered or unexported fields
}

type BZdata

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

type BZdataCF

type BZdataCF struct {
	Deadline string   `json:"cf_deadline,omitempty"`                  // use bzData.deadline, unset is ""
	DevTM    string   `json:"cf_dev_target_milestone,omitempty"`      // unset is ""
	ITM      string   `json:"cf_internal_target_milestone,omitempty"` // unset is ""
	ZTR      string   `json:"cf_zstream_target_release,omitempty"`    // unset is ""
	ITR      string   `json:"cf_internal_target_release,omitempty"`   // unset is "---"
	Verified []string `json:"cf_verified,omitempty"`                  // unset is ""
}

type NameAndEmail

type NameAndEmail struct {
	Name       string
	Email      string
	Restricted bool
}

PRARIT: TODO need to refactor documentation/scripts to provide this as a package

type Pager

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

func NewPager

func NewPager(fs *flag.FlagSet) *Pager

If standard output is a terminal, redirect output to an external pager until the returned object's Close() method is called

func (*Pager) Close

func (pager *Pager) Close()

type SubSystem

type SubSystem struct {
	Subsystem string `subsystem`
	Labels    struct {
		Name              string   `name`
		ReadyForMergeDeps []string `readyForMergeDeps`
		NewLabels         string   `newLabels`
		EmailLabel        string   `emailLabel`
	}
	Status      string         `status`
	Maintainers []NameAndEmail `maintainers`
	Reviewers   []NameAndEmail `reviewers`
	Paths       struct {
		Includes       []string
		IncludeRegexes []string
		Excludes       []string
	}
	Scm         string `scm`
	MailingList string `mailingList`
}

type SubSystems

type SubSystems struct {
	SubSys []SubSystem `subsystems`
}

Jump to

Keyboard shortcuts

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