config

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GitHubRemoteSource

func GitHubRemoteSource(config *Config, gitcmd git.GitInterface) *remoteSource

func InternalConfigFilePath added in v0.11.0

func InternalConfigFilePath() string

func RepoConfigFilePath added in v0.7.0

func RepoConfigFilePath(gitcmd git.GitInterface) string

func UserConfigFilePath added in v0.7.0

func UserConfigFilePath() string

Types

type Config

type Config struct {
	Repo     *RepoConfig
	User     *UserConfig
	Internal *InternalConfig
}

func DefaultConfig added in v0.7.0

func DefaultConfig() *Config

func EmptyConfig added in v0.7.0

func EmptyConfig() *Config

func ParseConfig added in v0.7.0

func ParseConfig(gitcmd git.GitInterface) *Config

func (Config) MergeMethod added in v0.8.2

func (c Config) MergeMethod() (genclient.PullRequestMergeMethod, error)

type InternalConfig added in v0.11.0

type InternalConfig struct {
	MergeCheckCommit map[string]string `yaml:"mergeCheckCommit"`

	Stargazer bool `default:"false" yaml:"stargazer"`
	RunCount  int  `default:"0" yaml:"runcount"`
}

type RepoConfig added in v0.7.0

type RepoConfig struct {
	GitHubRepoOwner string `yaml:"githubRepoOwner"`
	GitHubRepoName  string `yaml:"githubRepoName"`
	GitHubHost      string `default:"github.com" yaml:"githubHost"`

	RequireChecks   bool `default:"true" yaml:"requireChecks"`
	RequireApproval bool `default:"true" yaml:"requireApproval"`

	GitHubRemote   string   `default:"origin" yaml:"githubRemote"`
	GitHubBranch   string   `default:"master" yaml:"githubBranch"`
	RemoteBranches []string `yaml:"remoteBranches"`

	MergeMethod string `default:"rebase" yaml:"mergeMethod"`

	PRTemplatePath        string `yaml:"prTemplatePath,omitempty"`
	PRTemplateInsertStart string `yaml:"prTemplateInsertStart,omitempty"`
	PRTemplateInsertEnd   string `yaml:"prTemplateInsertEnd,omitempty"`

	MergeCheck string `yaml:"mergeCheck,omitempty"`
}

Config object to hold spr configuration

type UserConfig added in v0.7.0

type UserConfig struct {
	ShowPRLink       bool `default:"true" yaml:"showPRLink"`
	LogGitCommands   bool `default:"true" yaml:"logGitCommands"`
	LogGitHubCalls   bool `default:"true" yaml:"logGitHubCalls"`
	StatusBitsHeader bool `default:"true" yaml:"statusBitsHeader"`
	StatusBitsEmojis bool `default:"true" yaml:"statusBitsEmojis"`

	CreateDraftPRs       bool `default:"false" yaml:"createDraftPRs"`
	PreserveTitleAndBody bool `default:"false" yaml:"preserveTitleAndBody"`
	NoRebase             bool `default:"false" yaml:"noRebase"`
}

Jump to

Keyboard shortcuts

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