Documentation
¶
Overview ¶
Package commit writes file changes and pull requests through the caller's Git host identity.
Index ¶
- Constants
- Variables
- func Merge(ctx context.Context, remote Remote, pullRequest PullRequest, approved bool) error
- func Removes(changes []FileChange, path string) bool
- type AuthError
- type Change
- type ChangeKind
- type CheckState
- type Fakedeprecated
- func NewFake() *Fakedeprecated
- type FakeCommitdeprecated
- type FakePullRequestdeprecated
- type FileChange
- type GitHubdeprecated
- type GitHubOptiondeprecated
- type HeadReader
- type Lister
- type MergedFilesLister
- type PrefixFinder
- type PullRequest
- type Reader
- type Remote
- type Repository
- type Request
- type ReviewState
- type Status
Constants ¶
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 ¶
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 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.
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
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
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
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. |