commit

package
v0.14.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 5 Imported by: 3 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package commit writes file changes and pull requests through the caller's Git host identity.

Index

Constants

View Source
const (
	ReviewNone             = commitmodel.ReviewNone
	ReviewApproved         = commitmodel.ReviewApproved
	ReviewChangesRequested = commitmodel.ReviewChangesRequested
	ChecksNone             = commitmodel.ChecksNone
	ChecksPending          = commitmodel.ChecksPending
	ChecksSuccess          = commitmodel.ChecksSuccess
	ChecksFailure          = commitmodel.ChecksFailure
	FileAdded              = commitmodel.FileAdded
	FileModified           = commitmodel.FileModified
	FileRemoved            = commitmodel.FileRemoved
	FileRenamed            = commitmodel.FileRenamed
	OpCreateBranch         = commitmodel.OpCreateBranch
	OpCommit               = commitmodel.OpCommit
	OpOpenPullRequest      = commitmodel.OpOpenPullRequest
	OpStatus               = commitmodel.OpStatus
	OpMerge                = commitmodel.OpMerge
	OpApprove              = commitmodel.OpApprove
	OpFindPullRequest      = commitmodel.OpFindPullRequest
	OpFindByPrefix         = commitmodel.OpFindByPrefix
	OpEnableAutoMerge      = commitmodel.OpEnableAutoMerge
	OpClose                = commitmodel.OpClose
	OpRevert               = commitmodel.OpRevert
	OpReadFile             = commitmodel.OpReadFile
	OpListFiles            = commitmodel.OpListFiles
	OpHead                 = commitmodel.OpHead
	OpMergedFiles          = commitmodel.OpMergedFiles
)

Variables

View Source
var (
	ErrAuth            = commitmodel.ErrAuth
	ErrInvalidRequest  = commitmodel.ErrInvalidRequest
	ErrNoFiles         = commitmodel.ErrNoFiles
	ErrConflictingBase = commitmodel.ErrConflictingBase
	ErrDuplicatePath   = commitmodel.ErrDuplicatePath
	ErrStaleBranch     = commitmodel.ErrStaleBranch
	ErrNotApproved     = commitmodel.ErrNotApproved
	ErrChecksPending   = commitmodel.ErrChecksPending
	ErrChecksFailed    = commitmodel.ErrChecksFailed
	ErrHeadMoved       = commitmodel.ErrHeadMoved
	ErrNotMerged       = commitmodel.ErrNotMerged
	ErrNothingToRevert = commitmodel.ErrNothingToRevert
	ErrFileNotFound    = commitmodel.ErrFileNotFound
)

Functions

func Merge

func Merge(ctx context.Context, remote Remote, pullRequest PullRequest, approved bool) error

func Removes added in v0.12.0

func Removes(changes []FileChange, path string) bool

Types

type AuthError

type AuthError = commitmodel.AuthError

type Change

type Change = commitmodel.Change

type ChangeKind added in v0.12.0

type ChangeKind = commitmodel.ChangeKind

type CheckState

type CheckState = commitmodel.CheckState

type Fake deprecated

type Fake = committest.Remote

Deprecated: use committest.Remote.

func NewFake deprecated

func NewFake() *Fake

Deprecated: use committest.NewRemote.

type FakeCommit deprecated

type FakeCommit = committest.Commit

Deprecated: use committest.Commit.

type FakePullRequest deprecated

type FakePullRequest = committest.PullRequest

Deprecated: use committest.PullRequest.

type FileChange added in v0.12.0

type FileChange = commitmodel.FileChange

type GitHub deprecated

type GitHub = github.Remote

Deprecated: use github.Remote.

func NewGitHub deprecated

func NewGitHub(token string, options ...GitHubOption) (*GitHub, error)

Deprecated: use github.New.

func NewGitHubWithClient deprecated added in v0.4.0

func NewGitHubWithClient(client *http.Client, options ...GitHubOption) (*GitHub, error)

Deprecated: use github.NewWithClient.

type GitHubOption deprecated

type GitHubOption = github.Option

Deprecated: use github.Option.

func WithBaseURL deprecated

func WithBaseURL(baseURL string) GitHubOption

Deprecated: use github.WithBaseURL.

func WithHTTPClient deprecated

func WithHTTPClient(client *http.Client) GitHubOption

Deprecated: use github.WithHTTPClient.

type HeadReader added in v0.12.0

type HeadReader = commitmodel.HeadReader

type Lister added in v0.11.0

type Lister = commitmodel.Lister

type MergedFilesLister added in v0.12.0

type MergedFilesLister = commitmodel.MergedFilesLister

type PrefixFinder added in v0.12.0

type PrefixFinder = commitmodel.PrefixFinder

type PullRequest

type PullRequest = commitmodel.PullRequest

func Open

func Open(ctx context.Context, remote Remote, request Request, changes []Change) ([]PullRequest, error)

type Reader added in v0.9.0

type Reader = commitmodel.Reader

type Remote

type Remote = commitmodel.Remote

type Repository

type Repository = commitmodel.Repository

type Request

type Request = commitmodel.Request

type ReviewState

type ReviewState = commitmodel.ReviewState

type Status

type Status = commitmodel.Status

Directories

Path Synopsis
internal
remote
Package remote holds what the commit.Remote implementations share: the names and messages of the branches, commits and pull requests they make.
Package remote holds what the commit.Remote implementations share: the names and messages of the branches, commits and pull requests they make.

Jump to

Keyboard shortcuts

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