Help us shape the future of Go! Take the 2026 Go Developer Survey

cmd

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *slog.Logger

Functions

func CombinePRs added in v0.0.2

func CombinePRs(ctx context.Context, graphQlClient *api.GraphQLClient, restClient *api.RESTClient, owner, repo string, matchedPRs []struct {
	Number  int
	Title   string
	Branch  string
	Base    string
	BaseSHA string
}) error

func GetPRStatusInfo added in v0.0.2

func GetPRStatusInfo(ctx context.Context, graphQlClient *api.GraphQLClient, owner, repo string, prNumber int) (*prStatusResponse, error)

GetPRStatusInfo fetches both CI status and approval status using GitHub's GraphQL API

func NewRootCmd

func NewRootCmd() *cobra.Command

NewRootCmd creates the root command for the gh-combine CLI

func ParseRepositories

func ParseRepositories(args []string, reposFile string, defaultOwner string) ([]string, error)

ParseRepositories parses repository names from arguments or file with support for default owner

func PrMatchesCriteria

func PrMatchesCriteria(branch string, prLabels []struct{ Name string }) bool

checks if a PR matches all filtering criteria

func PrMeetsRequirements added in v0.0.2

func PrMeetsRequirements(ctx context.Context, graphQlClient *api.GraphQLClient, owner, repo string, prNumber int) (bool, error)

PrMeetsRequirements checks if a PR meets additional requirements beyond basic criteria

func Run

func Run() error

Run executes the main functionality of the application

func SetupSignalContext

func SetupSignalContext() (context.Context, context.CancelFunc)

SetupSignalContext creates a context that's cancelled on SIGINT or SIGTERM

func ValidateInputs

func ValidateInputs(args []string) error

validateInputs checks if the provided inputs are valid

Types

type Spinner

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

func NewSpinner

func NewSpinner(message string) *Spinner

func (*Spinner) Stop

func (s *Spinner) Stop()

func (*Spinner) UpdateMessage

func (s *Spinner) UpdateMessage(message string)

UpdateMessage changes the text displayed next to the spinner while it's running

Jump to

Keyboard shortcuts

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