git

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalFlags []string

Functions

func CommentChar

func CommentChar() string

func Config

func Config(name string) (string, error)

func GitCurrentBranch

func GitCurrentBranch() (string, error)

func GitDir

func GitDir() (string, error)

func GitEditor

func GitEditor() (string, error)

Types

type Client

type Client interface {
	RemoteInfos() ([]*RemoteInfo, error)
	CurrentBranch() (string, error)
}

func NewGitClient

func NewGitClient() Client

type Editor

type Editor struct {
	Program string
	Topic   string
	File    string
	Message string
	CS      string
	// contains filtered or unexported fields
}

func NewEditor

func NewEditor(filePrefix, topic, message string, editFunc func(program, file string) error) (editor *Editor, err error)

func (*Editor) DeleteFile

func (e *Editor) DeleteFile() error

func (*Editor) EditTitleAndDescription

func (e *Editor) EditTitleAndDescription() (title, body string, err error)

type GitClient

type GitClient struct {
	Client
}

func (*GitClient) CurrentBranch

func (g *GitClient) CurrentBranch() (string, error)

func (*GitClient) RemoteInfos

func (g *GitClient) RemoteInfos() ([]*RemoteInfo, error)

type MockClient

type MockClient struct {
	MockRemoteInfos   func() ([]*RemoteInfo, error)
	MockCurrentBranch func() (string, error)
}

func (*MockClient) CurrentBranch

func (m *MockClient) CurrentBranch() (string, error)

func (*MockClient) RemoteInfos

func (m *MockClient) RemoteInfos() ([]*RemoteInfo, error)

type RemoteInfo

type RemoteInfo struct {
	Domain     string
	NameSpace  string
	Repository string
}

func GitRemotes

func GitRemotes() ([]*RemoteInfo, error)

func NewRemoteInfo

func NewRemoteInfo(url string) *RemoteInfo

func (*RemoteInfo) ApiUrl

func (r *RemoteInfo) ApiUrl() string

func (*RemoteInfo) BaseUrl

func (r *RemoteInfo) BaseUrl() string

func (*RemoteInfo) BranchUrl

func (r *RemoteInfo) BranchUrl(branch string) string

func (*RemoteInfo) IssueDetailUrl

func (r *RemoteInfo) IssueDetailUrl(issueNo int) string

func (*RemoteInfo) IssueUrl

func (r *RemoteInfo) IssueUrl() string

func (*RemoteInfo) MergeRequestDetailUrl

func (r *RemoteInfo) MergeRequestDetailUrl(mergeRequestNo int) string

func (*RemoteInfo) MergeRequestUrl

func (r *RemoteInfo) MergeRequestUrl() string

func (*RemoteInfo) PipeLineDetailUrl

func (r *RemoteInfo) PipeLineDetailUrl(iid int) string

func (*RemoteInfo) PipeLineUrl

func (r *RemoteInfo) PipeLineUrl() string

func (*RemoteInfo) RepositoryFullName

func (r *RemoteInfo) RepositoryFullName() string

func (*RemoteInfo) RepositoryUrl

func (r *RemoteInfo) RepositoryUrl() string

Jump to

Keyboard shortcuts

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