Documentation ¶
Index ¶
- func APIAuth(creds *common.GitlabCredentials) *http.BasicAuth
- func AllLocalRepos(cmd common.ConfiguredCommand) *common.RepoInfos
- func CommitAndPush(cmd common.ConfiguredCommand, r *git.Repository, u *gl.User, ...)
- func CreateIfNotExists(tree *git.Worktree, file string)
- func DirsAtLevel(path string, validators []common.Validator) ([]string, error)
- func FindLocalRepo(cmd common.ConfiguredCommand, creds *common.GitlabCredentials, nameish string) *common.RepoInfo
- func MustClone(cmd common.ConfiguredCommand, creds *common.GitlabCredentials, wrt io.Writer, ...) *git.Repository
- func Status(dir string) git.Status
- func StatusMsg(dir string) string
- func TargetRepoBlocks(cmd common.ConfiguredCommand, rc common.RepoCommand, ...) *common.BlockRefs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIAuth ¶ added in v0.4.0
func APIAuth(creds *common.GitlabCredentials) *http.BasicAuth
returns an auth object for http connections containing a username and a password or an access token.
func AllLocalRepos ¶
func AllLocalRepos(cmd common.ConfiguredCommand) *common.RepoInfos
returns the collection of repo pathes below the default local repository path.
func CommitAndPush ¶
func CommitAndPush(cmd common.ConfiguredCommand, r *git.Repository, u *gl.User, creds *common.GitlabCredentials, msg string, force bool)
for the given git repository commits the current stage with the given commit message and pushes the commit using the given gitlab user and access token. if the commit message is omitted, it is generated from the commit object.
func CreateIfNotExists ¶
in the given work tree creates a file with the given name if it doesn't exist yet.
func DirsAtLevel ¶ added in v0.6.0
returns all directories that are exactly N levels below path.
N is the length of the slice of validation functions MINUS 1 the first validation function will validate the basename of path the second every direct subdirectory of path and so on only directory names that are validated successfully will be returned a nil validation function evaluates to true.
func FindLocalRepo ¶ added in v0.6.0
func FindLocalRepo(cmd common.ConfiguredCommand, creds *common.GitlabCredentials, nameish string) *common.RepoInfo
finds a local repository via 'name' or 'group/name' or '~/name'.
func MustClone ¶ added in v0.4.0
func MustClone(cmd common.ConfiguredCommand, creds *common.GitlabCredentials, wrt io.Writer, grp *gl.Group, usr *gl.User, prj *gl.Project) *git.Repository
makes sure the given git repository is cloned locally (possibly using the given access token for the clone) this also fetches previously unfetched tags and pulls from all remotes returns the git repository.
func Status ¶
for the given path to a local git repository returns the current git status of its working directory.
func StatusMsg ¶
for the given path to a local git repository returns a string representation of the current git status of its working directory.
func TargetRepoBlocks ¶
func TargetRepoBlocks(cmd common.ConfiguredCommand, rc common.RepoCommand, creds *common.GitlabCredentials) *common.BlockRefs
returns the collection of building blocks added to the currently selected control repository.
Types ¶
This section is empty.