config

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config handles configuration and command line argument parsing for ghprmerge.

Index

Constants

This section is empty.

Variables

View Source
var ErrHelp = flag.ErrHelp

ErrHelp is returned when -help or -h is passed.

View Source
var ErrVersion = errors.New("version requested")

ErrVersion is returned when --version is passed.

Functions

This section is empty.

Types

type Command added in v0.4.0

type Command string

Command represents the subcommand to execute.

const (
	CommandNone   Command = ""
	CommandMerge  Command = "merge"
	CommandRebase Command = "rebase"
	CommandReport Command = "report"
	CommandClose  Command = "close"
)

type CommandDescription added in v0.4.1

type CommandDescription struct {
	Name        Command
	Description string
}

type Config

type Config struct {
	Org                string
	SourceBranches     []string
	SourceBranch       string // First source branch (for backward compat in merger)
	Rebase             bool
	Merge              bool
	Close              bool
	DeleteSourceBranch bool
	SkipRebase         bool
	Repos              []string
	RepoLimit          int
	Workers            int
	JSON               bool
	Confirm            bool
	Verbose            bool
	NoColor            bool
	NoProgress         bool
	Token              string
	Report             bool
	SourceBranchPrefix []string
	MinGroupSize       int
	MinMergeDelay      int
	Verbosity          string
	Command            Command
	Author             string
}

Config holds all configuration for ghprmerge.

func ParseFlags

func ParseFlags(args []string, version string) (*Config, error)

ParseFlags parses command-line flags and environment variables. Supports subcommands: merge, rebase, report, close Usage: ghprmerge <command> [flags]

func (*Config) IsAnalysisOnly

func (c *Config) IsAnalysisOnly() bool

IsAnalysisOnly returns true if no mutating subcommand is used.

func (*Config) Validate

func (c *Config) Validate() error

Validate checks that all required configuration is present.

type StringSliceFlag

type StringSliceFlag []string

StringSliceFlag is a custom flag type that collects multiple string values.

func (*StringSliceFlag) Set

func (s *StringSliceFlag) Set(value string) error

func (*StringSliceFlag) String

func (s *StringSliceFlag) String() string

Jump to

Keyboard shortcuts

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