cli

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Make

func Make() (*cobra.Command, error)

func ValidateParams

func ValidateParams(params []string) func(cmd *cobra.Command, args []string) error

Types

type Filter added in v0.6.0

type Filter struct {
	Name string
	PR   func(github.PullRequest) (bool, error) // todo shjould this return an error?
}

func GetFilterForAuthors added in v0.6.0

func GetFilterForAuthors(authors []string) *Filter

func GetFilterForCreatedTime added in v0.6.0

func GetFilterForCreatedTime(duration time.Duration) *Filter

func GetFilterForLabels added in v0.6.0

func GetFilterForLabels(labels []string, and bool) *Filter

func GetFilterForLabelsAnd added in v0.6.0

func GetFilterForLabelsAnd(labels []string) *Filter

func GetFilterForLabelsOr added in v0.6.0

func GetFilterForLabelsOr(labels []string) *Filter

func GetFilterForMilestone added in v0.6.0

func GetFilterForMilestone(milestoneRaw string) *Filter

func GetFilterForTitleRegex added in v0.6.0

func GetFilterForTitleRegex(pattern string) (*Filter, error)

func GetFilterForUpdatedTime added in v0.6.0

func GetFilterForUpdatedTime(duration time.Duration) *Filter

type FlagData

type FlagData struct {
	GH            FlagsGitHub
	TC            FlagsTeamCity
	OpenInBrowser bool
	RunAllTests   bool
	Services      []string
	Quiet         bool
	JSON          bool
	Silent        bool
}

func GetFlags added in v0.6.0

func GetFlags() FlagData

func (FlagData) BuildCmd added in v0.6.0

func (f FlagData) BuildCmd(buildTypeID, branch, testRegex, service string) (int, string, error)

func (FlagData) BuildResultsCmd added in v0.6.0

func (f FlagData) BuildResultsCmd(buildID int) error

func (FlagData) BuildResultsForPRCmd added in v0.6.0

func (f FlagData) BuildResultsForPRCmd(pr int) error

func (FlagData) GetAndRunPrsTests added in v0.6.0

func (f FlagData) GetAndRunPrsTests(prs map[int]string, testRegExParam string) error

func (FlagData) GetFilters added in v0.6.0

func (f FlagData) GetFilters() ([]Filter, error)

func (FlagData) GetPrTests added in v0.6.0

func (f FlagData) GetPrTests(number int, title string) (*map[string][]string, error)

func (FlagData) NewRepo added in v0.6.0

func (f FlagData) NewRepo() GithubRepo

func (FlagData) NewServer added in v0.6.0

func (f FlagData) NewServer() TcServer

type FlagsGitHub added in v0.6.0

type FlagsGitHub struct {
	Token        string
	Repo         string
	FileRegEx    string
	SplitTestsOn string
	FilterPRs    FlagsGitHubPrFilter
}

type FlagsGitHubPrFilter added in v0.6.0

type FlagsGitHubPrFilter struct {
	Authors      []string
	LabelsOr     []string
	LabelsAnd    []string
	Milestone    string
	TitleRegex   string
	Drafts       bool
	CreationTime time.Duration
	UpdatedTime  time.Duration
}

type FlagsTeamCity added in v0.6.0

type FlagsTeamCity struct {
	Build     FlagsTeamCityBuild
	ServerURL string
	Token     string
	User      string
	Pass      string
}

type FlagsTeamCityBuild added in v0.6.0

type FlagsTeamCityBuild struct {
	TypeID           string
	LegacyTypeID     string // deprecated --buildtypeid, resolved in resolveBuildTypeID()
	Parameters       string
	SkipQueue        bool
	Wait             bool
	Latest           bool
	Comment          bool
	ForceOldUI       bool
	AddServiceSuffix bool
	QueueTimeout     int
	RunTimeout       int
	Tags             []string
}

type GithubRepo

type GithubRepo struct {
	gh.Repo
}

wrap the common gh lib shared with my other tools. splits common GH code from this CLI tool's specific tooling code

func (GithubRepo) GetAllPullRequestFiles added in v0.6.0

func (gr GithubRepo) GetAllPullRequestFiles(pri int, filterRegExStr string) (*map[string]struct{}, error)

func (GithubRepo) ListAllPullRequestFiles added in v0.6.0

func (gr GithubRepo) ListAllPullRequestFiles(pri int, cb func([]*github.CommitFile, *github.Response) error) error

func (GithubRepo) ListServices added in v0.7.0

func (gr GithubRepo) ListServices() ([]string, error)

ListServices lists all service directory names under internal/services/ in the repo

func (GithubRepo) PrTests

func (gr GithubRepo) PrTests(pri int, filterRegExStr, splitTestsAt string) (*map[string][]string, error)

todo break this apart - get/check PR state, get files, filter/process files, get tests, get services.

type TcServer added in v0.6.0

type TcServer struct {
	tc.Server
}

wrap the common tc lib shared with my other tools. splits common TC code from this CLI tool's specific tooling code

Jump to

Keyboard shortcuts

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