userinput

package
v7.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package userinput allows the user to enter configuration data via CLI dialogs and prompts.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ResponseTypeAbort stands for the user choosing to abort the unfinished run state.
	ResponseTypeAbort = "abort"
	// ResponseTypeContinue stands for the user choosing to continue the unfinished run state.
	ResponseTypeContinue = "continue"
	// ResponseTypeDiscard stands for the user choosing to discard the unfinished run state.
	ResponseTypeDiscard = "discard"
	// ResponseTypeQuit stands for the user choosing to quit the program.
	ResponseTypeQuit = "quit"
	// ResponseTypeSkip stands for the user choosing to continue the unfinished run state by skipping the current branch.
	ResponseTypeSkip = "skip"
)

Functions

func AskForBranchAncestry

func AskForBranchAncestry(branchName, defaultBranchName string, repo *git.ProdRepo) error

AskForBranchAncestry prompts the user for all unknown ancestors of the given branch.

func AskForBranchParent

func AskForBranchParent(branchName, defaultBranchName string, repo *git.ProdRepo) (string, error)

AskForBranchParent prompts the user for the parent of the given branch.

func AskHowToHandleUnfinishedRunState

func AskHowToHandleUnfinishedRunState(command, endBranch string, endTime time.Time, canSkip bool) (string, error)

AskHowToHandleUnfinishedRunState prompts the user for how to handle the unfinished run state.

func ConfigureMainBranch

func ConfigureMainBranch(repo *git.ProdRepo) error

ConfigureMainBranch has the user to confgure the main branch.

func ConfigurePerennialBranches

func ConfigurePerennialBranches(repo *git.ProdRepo) error

ConfigurePerennialBranches has the user to confgure the perennial branches.

func DetermineSquashCommitAuthor

func DetermineSquashCommitAuthor(branchName string, repo *git.ProdRepo) (string, error)

DetermineSquashCommitAuthor gets the author of the supplied branch. If the branch has more than one author, the author is queried from the user.

func EnsureIsConfigured

func EnsureIsConfigured(repo *git.ProdRepo) error

EnsureIsConfigured has the user to confgure the main branch and perennial branches if needed.

func EnsureKnowsParentBranches

func EnsureKnowsParentBranches(branchNames []string, repo *git.ProdRepo) error

EnsureKnowsParentBranches asserts that the entire ancestry for all given branches is known to Git Town. Missing ancestry information is queried from the user.

Types

This section is empty.

Jump to

Keyboard shortcuts

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