pkg

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogLevelInfo  = 0
	LogLevelDebug = -4
	LogLevelWarn  = 4
	LogLevelError = 8
)

Variables

This section is empty.

Functions

func ParseFlags

func ParseFlags(f *Flags)

func SetupLoggingStdout

func SetupLoggingStdout(f Flags) error

func ValidateFlags

func ValidateFlags(f *Flags, version string) error

Types

type Flags

type Flags struct {
	// required
	GithubToken string // set by env var GITHUB_TOKEN
	Org         string
	Cmd         string

	// optional
	Repos         string // comma-separated list of repositories
	BaseURL       string // default: github.com
	DefaultBranch string // default: taken from api
	PRTitle       string
	PRBody        string
	PRBranch      string
	PRCommitMsg   string
	Parallel      int
	NoInteractive bool
	Dry           bool
	LogLevel      int
	Version       bool
}

type GithubHandler

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

func NewGithubHandler

func NewGithubHandler(flags Flags) (*GithubHandler, error)

func (*GithubHandler) GetRepos

func (h *GithubHandler) GetRepos() ([]string, error)

func (*GithubHandler) Handle

func (h *GithubHandler) Handle(repo string) error

type GithubURL

type GithubURL struct {
}

func NewGithubURL

func NewGithubURL() *GithubURL

func (*GithubURL) API

func (e *GithubURL) API(baseURL string) string

func (*GithubURL) CloneURL

func (e *GithubURL) CloneURL(baseURL, orgName, repoName string) string

func (*GithubURL) RemoteURL

func (e *GithubURL) RemoteURL(baseURL, orgName, repoName, token string) string

func (*GithubURL) Web

func (e *GithubURL) Web(baseURL string) string

type Slices added in v1.0.1

type Slices struct{}

func NewSlices added in v1.0.1

func NewSlices() *Slices

func (*Slices) FilterByCSV added in v1.0.1

func (s *Slices) FilterByCSV(slice []string, csv string) []string

Jump to

Keyboard shortcuts

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