git

package
v8.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BranchName

func BranchName(cmd *cobra.Command, args []string)

BranchName shows the full current branch name

func Cleanup

func Cleanup(cmd *cobra.Command, args []string)

Cleanup deletes all non default branches.

func CommitAllWithTask

func CommitAllWithTask(cmd *cobra.Command, args []string)

CommitAllWithTask commits all changes with the task name

func CommitWithTask

func CommitWithTask(cmd *cobra.Command, args []string)

CommitWithTask commits changes with the task name

func Delete

func Delete(cmd *cobra.Command, branches []string)

Delete deletes one or more branch both locally and on a remote.

func FullBranchName

func FullBranchName(cmd *cobra.Command, args []string)

FullBranchName shows the full current branch name

func FullSha

func FullSha(cmd *cobra.Command, args []string)

FullSha shows the full current branch sha

func InitCLI

func InitCLI() *cobra.Command

InitCLI setups the GIT module

func IsDirty

func IsDirty(cmd *cobra.Command, args []string)

IsDirty checks if the current GIT Repository contains uncommited changes

func IsRepository

func IsRepository(cmd *cobra.Command, args []string)

IsRepository checks if the current working directory is a GIT repository

func PullRequestURL

func PullRequestURL(cmd *cobra.Command, args []string)

PullRequestURL shows a pull request URL

func Push

func Push(cmd *cobra.Command, args []string)

Push pushes the current branch to the remote.

func Reset

func Reset(cmd *cobra.Command, args []string)

Reset resets all uncommitted changes

func Sha

func Sha(cmd *cobra.Command, args []string)

Sha shows the full current branch sha

func ShowRemotes

func ShowRemotes(cmd *cobra.Command, args []string)

ShowRemotes lists all the remotes for the current GIT Repository

func Summary

func Summary(cmd *cobra.Command, args []string)

Summary shows the current branch name, the current SHA and whether the working directory is dirty

func Task

func Task(cmd *cobra.Command, args []string)

Task shows the current task

func Update

func Update(cmd *cobra.Command, args []string)

Update fetchs from remote and pulls a a branch.

func WorkflowDeleteRelease

func WorkflowDeleteRelease(cmd *cobra.Command, args []string)

WorkflowDeleteRelease deletes a release branch locally and remotely.

func WorkflowFastCommit

func WorkflowFastCommit(cmd *cobra.Command, args []string)

WorkflowFastCommit creates a local branch, commit changes and then merges it back to the base branch.

func WorkflowFastPullRequest

func WorkflowFastPullRequest(cmd *cobra.Command, args []string)

WorkflowFastPullRequest creates a local branch, commit changes and then sends a Pull Request, deleting the local branch at the end.

func WorkflowFinish

func WorkflowFinish(cmd *cobra.Command, args []string)

WorkflowFinish merges a branch back to its base remote branch.

func WorkflowFinishRelease

func WorkflowFinishRelease(cmd *cobra.Command, args []string)

WorkflowFinishRelease merges a branch back to its base remote release branch.

func WorkflowFullFinish

func WorkflowFullFinish(cmd *cobra.Command, args []string)

WorkflowFullFinish merges a branch back to its base remote branch and then deletes the local copy.

func WorkflowFullFinishRelease

func WorkflowFullFinishRelease(cmd *cobra.Command, args []string)

WorkflowFullFinishRelease merges a branch back to its base remote release branch and then deletes the local copy.

func WorkflowImport

func WorkflowImport(cmd *cobra.Command, args []string)

WorkflowImport imports latest changes to a local branch on top of an existing remote branch.

func WorkflowImportRelease

func WorkflowImportRelease(cmd *cobra.Command, args []string)

WorkflowImportRelease imports latest changes to a local branch on top of an existing remote release branch.

func WorkflowPullRequest

func WorkflowPullRequest(cmd *cobra.Command, args []string)

WorkflowPullRequest sends a Pull Request and deletes the local branch.

func WorkflowRefresh

func WorkflowRefresh(cmd *cobra.Command, args []string)

WorkflowRefresh rebases the current branch on top of an existing remote branch

func WorkflowRefreshRelease

func WorkflowRefreshRelease(cmd *cobra.Command, args []string)

WorkflowRefreshRelease rebases the current branch on top of an existing remote release branch.

func WorkflowRelease

func WorkflowRelease(cmd *cobra.Command, args []string)

WorkflowRelease tags and pushes a new release branch out of the base one.

func WorkflowStart

func WorkflowStart(cmd *cobra.Command, args []string)

WorkflowStart starts a new branch out of the base one

func WorkflowStartRelease

func WorkflowStartRelease(cmd *cobra.Command, args []string)

WorkflowStartRelease starts a new branch out of a remote release branch.

Types

type Configuration

type Configuration struct {
	DefaultBranch string   `json:"defaultBranch"`
	DefaultRemote string   `json:"defaultRemote"`
	DefaultPrefix string   `json:"defaultPrefix"`
	OpenPath      string   `json:"openPath"`
	PrependTask   bool     `json:"prependTask"`
	Quiet         bool     `json:"quiet"`
	Debug         bool     `json:"debug"`
	DryRun        bool     `json:"dryRun"`
	TaskMatchers  []string `json:"taskMatchers"`
}

Configuration represents the Fishamnium GIT configuration

type ExecutionResult

type ExecutionResult struct {
	ExitCode int
	Stdout   string
	Stderr   string
	Error    error
}

ExecutionResult represents a command execution result

func (ExecutionResult) Success

func (t ExecutionResult) Success() bool

Success checks whether the command was executed and exited with status 0

type Remote

type Remote struct {
	Fetch string
	Push  string
}

Remote represent a GIT Remote

func (Remote) MarshalJSON

func (t Remote) MarshalJSON() (out []byte, err error)

MarshalJSON serializes a Remote as JSON

func (*Remote) Update

func (t *Remote) Update(field, value string)

Update updates the field of a Remote

Jump to

Keyboard shortcuts

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