internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Range

func Range(first, last int) (result []string)

func TestRepository

func TestRepository(t *testing.T, steps ...Step) *git.Repository

TestRepository creates

Types

type Change

type Change struct {
	Repository *git.Repository
	// PR source branch ref
	SourceBranch plumbing.ReferenceName
	// PR target branch ref
	TargetBranch plumbing.ReferenceName
	// PR source branch last commit
	SourceLastCommit *object.Commit
	// PR target branch last commit
	TargetLastCommit *object.Commit
	// Source and target latest common commit
	CommonCommit *object.Commit
}

func InitLast

func InitLast(rep *git.Repository, lastCommitsCount int) (history Change, err error)

InitLast - last N commits

func InitPR

func InitPR(repository *git.Repository, target plumbing.ReferenceName) (history Change, err error)

InitPR - PR

type Step

type Step func(t *testing.T, r *git.Repository, wt *git.Worktree)

func Commits

func Commits(cc []string) Step

Commits creates list new file commits with file name, content and message for list

func NewBranch

func NewBranch(name string, prevCommits int) Step

NewBranch creates new branch with parent commit = current - prevCommits

Jump to

Keyboard shortcuts

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