Documentation ¶
Overview ¶
Package userinput allows the user to enter configuration data via CLI dialogs and prompts.
Index ¶
- Variables
- func AskForBranchAncestry(branchName, defaultBranchName string, repo *git.ProdRepo) error
- func AskForBranchParent(branchName, defaultBranchName string, repo *git.ProdRepo) (string, error)
- func AskHowToHandleUnfinishedRunState(command, endBranch string, endTime time.Time, canSkip bool) (string, error)
- func ConfigureMainBranch(repo *git.ProdRepo) error
- func ConfigurePerennialBranches(repo *git.ProdRepo) error
- func DetermineSquashCommitAuthor(branchName string, repo *git.ProdRepo) (string, error)
- func EnsureIsConfigured(repo *git.ProdRepo) error
- func EnsureKnowsParentBranches(branchNames []string, repo *git.ProdRepo) error
Constants ¶
This section is empty.
Variables ¶
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 ¶
AskForBranchAncestry prompts the user for all unknown ancestors of the given branch.
func AskForBranchParent ¶
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 ¶
ConfigureMainBranch has the user to confgure the main branch.
func ConfigurePerennialBranches ¶
ConfigurePerennialBranches has the user to confgure the perennial branches.
func DetermineSquashCommitAuthor ¶
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 ¶
EnsureIsConfigured has the user to confgure the main branch and perennial branches if needed.
Types ¶
This section is empty.