gitview

package
v0.1.29 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactCommit

type ArtifactCommit struct {
	Sha1      string   `json:"sha1"`
	Message   string   `json:"message"`
	Author    string   `json:"author"`
	Timestamp int64    `json:"timestamp"`
	Branch    string   `json:"branch"`
	Parents   []string `json:"parents"`
}

type GitView

type GitView struct {
	// contains filtered or unexported fields
}

GitView A read-only view of a git repository.

func New

func New(repositoryRoot string) (*GitView, error)

func (*GitView) BranchName

func (gv *GitView) BranchName() (string, error)

BranchName returns the current branch name on a repository, or an error if the repo head is not on a branch

func (*GitView) ChangeLog

func (gv *GitView) ChangeLog(currentCommit, previousCommit string, logger *logger.Logger) ([]*ArtifactCommit, error)

func (*GitView) CommitsBetween

func (gv *GitView) CommitsBetween(oldest, newest string, logger *logger.Logger) ([]*ArtifactCommit, error)

CommitsBetween list all commits that have happened between two commits in a git repo

func (*GitView) RepoUrl

func (gv *GitView) RepoUrl() (string, error)

RepoUrl returns HTTPS URL for the `origin` remote of a repo

Jump to

Keyboard shortcuts

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