validate

package
v9.0.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package validate provides functionality to validate the status of Git repositories. These validators are used mostly inside Cobra commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnterMainBranch

func EnterMainBranch(backend *git.BackendCommands) (string, error)

EnterMainBranch lets the user select a new main branch for this repo. This includes asking the user and updating the respective setting.

func EnterParent

func EnterParent(branch, defaultParent string, backend *git.BackendCommands) (string, error)

EnterParent lets the user select a new parent for the given branch.

func EnterPerennialBranches

func EnterPerennialBranches(backend *git.BackendCommands, mainBranch string) error

EnterPerennialBranches lets the user update the perennial branches. This includes asking the user and updating the respective settings based on the user selection.

func HandleUnfinishedState

func HandleUnfinishedState(run *git.ProdRunner, connector hosting.Connector) (quit bool, err error)

HandleUnfinishedState checks for unfinished state on disk, handles it, and signals whether to continue execution of the originally intended steps.

func HasGitVersion

func HasGitVersion(backend *git.BackendCommands) error

HasGitVersion verifies that the system has Git of version 2.7 or newer installed.

func IsAcceptableGitVersion

func IsAcceptableGitVersion(major, minor int) bool

IsAcceptableGitVersion indicates whether the given Git version works for Git Town.

func IsConfigured

func IsConfigured(backend *git.BackendCommands) error

IsConfigured verifies that the given Git repo contains necessary Git Town configuration.

func IsOnline

func IsOnline(config *git.RepoConfig) error

IsOnline verifies that the given Git repository is online.

func IsRepository

func IsRepository(run *git.ProdRunner) error

IsRepository verifies that the given folder contains a Git repository. It also navigates to the root directory of that repository.

func KnowsBranchAncestry

func KnowsBranchAncestry(branch, defaultBranch string, backend *git.BackendCommands) (err error)

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

func KnowsBranchesAncestry

func KnowsBranchesAncestry(branches []string, backend *git.BackendCommands) error

KnowsBranchesAncestry 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