commit

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package branch provides use-cases for creating or updating a branch.

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Commit

type Commit struct {
	CreateGitObject gitobject.Interface
	FileSystem      fs.Interface
	Logger          logger.Interface
	GitHub          github.Interface
}

Commit commits files to the default/given branch on the repository.

func (*Commit) Do

func (u *Commit) Do(ctx context.Context, in Input) error

type Input

type Input struct {
	TargetRepository git.RepositoryID
	TargetBranchName git.BranchName // if empty, target is the default branch
	ParentRepository git.RepositoryID
	CommitStrategy   commitstrategy.CommitStrategy
	CommitMessage    git.CommitMessage
	Author           *git.CommitAuthor // optional
	Committer        *git.CommitAuthor // optional
	Paths            []string          // if Paths and DeletedPaths are empty or nil, create an empty commit
	DeletedPaths     []string          // if Paths and DeletedPaths are empty or nil, create an empty commit
	NoFileMode       bool
	DryRun           bool

	ForceUpdate bool //TODO: support force-update as well
}

type Interface

type Interface interface {
	Do(ctx context.Context, in Input) error
}

Directories

Path Synopsis
Package mock_commit is a generated GoMock package.
Package mock_commit is a generated GoMock package.

Jump to

Keyboard shortcuts

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