Documentation ¶
Index ¶
- Variables
- func FindBranch(repository *git.Repository) (string, error)
- func FindCommit(repository *git.Repository) (*object.Commit, error)
- func FindCommitAuthor(repository *git.Repository) (string, error)
- func FindCommitHash(repository *git.Repository) (string, error)
- func FindRemoteUrl(repository *git.Repository) (string, error)
- func FindRepository(path string) (*git.Repository, error)
- func FindRepositoryName(repository *git.Repository, path string) (string, error)
- func FindRepositoryUrl(repository *git.Repository) (string, error)
- func ParseGitRemoteUrl(gitRemoteUrl string) (string, error)
- type MetaObject
Constants ¶
This section is empty.
Variables ¶
View Source
var CommitNameError = errors.New("failed to find commit hash")
View Source
var RepositoryNameError = errors.New("failed to find repository name")
Functions ¶
func FindBranch ¶
func FindCommit ¶
func FindCommitAuthor ¶
func FindCommitHash ¶
func FindRemoteUrl ¶
FindRemoteUrl returns first remote URL found in the repository
func FindRepository ¶
func FindRepositoryName ¶
func FindRepositoryUrl ¶
func ParseGitRemoteUrl ¶
Types ¶
type MetaObject ¶
type MetaObject struct { RepositoryName string CommitName string RepositoryUrl string BranchName string DefaultBranchName string Author string }
func NewMetaObject ¶
func NewMetaObject(path string, repositoryName string, commit string, branchName string, commitAuthor string, url string) (*MetaObject, error)
NewMetaObject returns MetaObject based on git repository existing on path. Otherwise, inputted arguments are used
Click to show internal directories.
Click to hide internal directories.