internal

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CLIMenu

func CLIMenu(
	config *Config,
) *cobra.Command

func CheckGitAndHooksDir

func CheckGitAndHooksDir() error

func CheckStatus added in v0.4.0

func CheckStatus(config *Config)

func ExecuteCommand

func ExecuteCommand(command string, args ...string) (string, error)

func ExecuteGitCommand

func ExecuteGitCommand(args ...string) (string, error)

Function to execute git commands

func GetCurrentBranchName

func GetCurrentBranchName() (string, error)

func GetGlobalBinPath

func GetGlobalBinPath() (string, error)

func InstallHooks added in v0.4.0

func InstallHooks(config *Config) error

func IsJiraFlowActive added in v0.4.0

func IsJiraFlowActive() bool

func RemoveGitHooks added in v0.3.0

func RemoveGitHooks(hookPath string) error

func RemoveHooks added in v0.4.0

func RemoveHooks(config *Config) error

func SetCommitMsgHook added in v0.2.0

func SetCommitMsgHook(config *Config) error

func SetGitHooks added in v0.2.0

func SetGitHooks(config *Config) error

configures all necessary Git hooks

func SetPostCheckoutHook added in v0.2.0

func SetPostCheckoutHook(config *Config) error

func ToggleJiraFlow added in v0.4.0

func ToggleJiraFlow(config *Config, enable bool) error

Types

type Config

type Config struct {
	AutoLink      bool   // Enable automatic JIRA key linking from branch name
	JiraKey       string // Default JIRA key if provided
	BranchPattern string // The pattern to use for matching JIRA keys in branch names
	HookPath      string // Path to the Git hooks directory
}

func NewConfig

func NewConfig() *Config

New returns a new Config instance with default settings.

type JiraManager

type JiraManager struct {
	Config *Config
}

JiraManager handles operations related to JIRA issues.

func NewJiraManager

func NewJiraManager(config *Config) *JiraManager

NewJiraManager creates a new instance of JiraManager with the provided configuration.

func (*JiraManager) ExtractIssueKeyFromBranchName

func (jm *JiraManager) ExtractIssueKeyFromBranchName(branchName string) (string, error)

func (*JiraManager) ValidateJiraKey

func (jm *JiraManager) ValidateJiraKey(
	input string,
) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳