Documentation
¶
Index ¶
- Variables
- func AddTestPullRequestTask(opts TestPullRequestOptions)
- func AdjustPullsCausedByBranchDeleted(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, ...) error
- func AttemptThreeWayMerge(ctx context.Context, gitPath string, gitRepo *git.Repository, ...) (bool, []string, error)
- func ChangeTargetBranch(ctx context.Context, pr *issues_model.PullRequest, doer *user_model.User, ...) (err error)
- func CheckFileProtection(repo *git.Repository, branchName, oldCommitID, newCommitID string, ...) ([]string, error)
- func CheckPRsForBaseBranch(ctx context.Context, baseRepo *repo_model.Repository, baseBranchName string) error
- func CheckPullBranchProtections(ctx context.Context, pr *issues_model.PullRequest, ...) (err error)
- func CheckPullMergeable(stdCtx context.Context, doer *user_model.User, perm *access_model.Permission, ...) error
- func CheckUnprotectedFiles(repo *git.Repository, branchName, oldCommitID, newCommitID string, ...) (bool, error)
- func CloseRepoBranchesPulls(ctx context.Context, doer *user_model.User, repo *repo_model.Repository) error
- func CreateCodeComment(ctx context.Context, doer *user_model.User, gitRepo *git.Repository, ...) (*issues_model.Comment, error)
- func CreateOrUpdateProtectedBranch(ctx context.Context, repo *repo_model.Repository, ...) error
- func CreatePushPullComment(ctx context.Context, pusher *user_model.User, pr *issues_model.PullRequest, ...) (comment *issues_model.Comment, err error)
- func DismissApprovalReviews(ctx context.Context, doer *user_model.User, pull *issues_model.PullRequest) error
- func DismissReview(ctx context.Context, reviewID, repoID int64, message string, ...) (comment *issues_model.Comment, err error)
- func DownloadDiffOrPatch(ctx context.Context, pr *issues_model.PullRequest, w io.Writer, ...) error
- func GetDefaultMergeMessage(ctx context.Context, baseGitRepo *git.Repository, pr *issues_model.PullRequest, ...) (message, body string, err error)
- func GetDiverging(ctx context.Context, pr *issues_model.PullRequest) (*git.DivergeObject, error)
- func GetIssuesAllCommitStatus(ctx context.Context, issues issues_model.IssueList) (map[int64][]*git_model.CommitStatus, map[int64]*git_model.CommitStatus, error)
- func GetIssuesLastCommitStatus(ctx context.Context, issues issues_model.IssueList) (map[int64]*git_model.CommitStatus, error)
- func GetPullRequestCommitStatusState(ctx context.Context, pr *issues_model.PullRequest) (structs.CommitStatusState, error)
- func GetReviewerTeams(ctx context.Context, repo *repo_model.Repository) ([]*organization.Team, error)
- func GetReviewers(ctx context.Context, repo *repo_model.Repository, doerID, posterID int64) ([]*user_model.User, error)
- func GetSquashMergeCommitMessages(ctx context.Context, pr *issues_model.PullRequest) string
- func Init() error
- func InitializePullRequests(ctx context.Context)
- func InvalidateCodeComments(ctx context.Context, prs issues_model.PullRequestList, doer *user_model.User, ...) error
- func IsCommitStatusContextSuccess(commitStatuses []*git_model.CommitStatus, requiredContexts []string) bool
- func IsErrDismissRequestOnClosedPR(err error) bool
- func IsErrFilePathProtected(err error) bool
- func IsErrInvalidMergeStyle(err error) bool
- func IsErrMergeConflicts(err error) bool
- func IsErrMergeDivergingFastForwardOnly(err error) bool
- func IsErrMergeUnrelatedHistories(err error) bool
- func IsErrPullRequestHasMerged(err error) bool
- func IsErrRebaseConflicts(err error) bool
- func IsErrSHADoesNotMatch(err error) bool
- func IsHeadEqualWithBranch(ctx context.Context, pr *issues_model.PullRequest, branchName string) (bool, error)
- func IsPullCommitStatusPass(ctx context.Context, pr *issues_model.PullRequest) (bool, error)
- func IsUserAllowedToMerge(ctx context.Context, pr *issues_model.PullRequest, p access_model.Permission, ...) (bool, error)
- func IsUserAllowedToUpdate(ctx context.Context, pull *issues_model.PullRequest, user *user_model.User) (mergeAllowed, rebaseAllowed bool, err error)
- func LFSPush(ctx context.Context, tmpBasePath, mergeHeadSHA, mergeBaseSHA string, ...) error
- func Merge(ctx context.Context, pr *issues_model.PullRequest, doer *user_model.User, ...) error
- func MergeRequiredContextsCommitStatus(commitStatuses []*git_model.CommitStatus, requiredContexts []string) structs.CommitStatusState
- func MergedManually(ctx context.Context, pr *issues_model.PullRequest, doer *user_model.User, ...) error
- func NewPullRequest(ctx context.Context, opts *NewPullRequestOptions) error
- func PushToBaseRepo(ctx context.Context, pr *issues_model.PullRequest) (err error)
- func SetAllowEdits(ctx context.Context, doer *user_model.User, pr *issues_model.PullRequest, ...) error
- func SetMerged(ctx context.Context, pr *issues_model.PullRequest, mergedCommitID string, ...) (bool, error)
- func StartPullRequestCheckDelayable(ctx context.Context, pr *issues_model.PullRequest)
- func StartPullRequestCheckImmediately(ctx context.Context, pr *issues_model.PullRequest)
- func StartPullRequestCheckOnView(ctx context.Context, pr *issues_model.PullRequest)
- func SubmitReview(ctx context.Context, doer *user_model.User, gitRepo *git.Repository, ...) (*issues_model.Review, *issues_model.Comment, error)
- func Update(ctx context.Context, pr *issues_model.PullRequest, doer *user_model.User, ...) error
- func UpdatePullsRefs(ctx context.Context, repo *repo_model.Repository, ...)
- func UpdateRef(ctx context.Context, pr *issues_model.PullRequest) (err error)
- type CommitInfo
- type ErrDismissRequestOnClosedPR
- type ErrFilePathProtected
- type ErrInvalidMergeStyle
- type ErrMergeConflicts
- type ErrMergeDivergingFastForwardOnly
- type ErrMergeUnrelatedHistories
- type ErrPullRequestHasMerged
- type ErrRebaseConflicts
- type ErrSHADoesNotMatch
- type MergeCheckType
- type NewPullRequestOptions
- type TestPullRequestOptions
Constants ¶
This section is empty.
Variables ¶
var ( ErrIsClosed = errors.New("pull is closed") ErrNoPermissionToMerge = errors.New("no permission to merge") ErrNotReadyToMerge = errors.New("not ready to merge") ErrHasMerged = errors.New("has already been merged") ErrIsWorkInProgress = errors.New("work in progress PRs cannot be merged") ErrIsChecking = errors.New("cannot merge while conflict checking is in progress") ErrNotMergeableState = errors.New("not in mergeable state") ErrDependenciesLeft = errors.New("is blocked by an open dependency") )
var AddPullRequestToCheckQueue = realAddPullRequestToCheckQueue
var ErrSubmitReviewOnClosedPR = errors.New("can't submit review for a closed or merged PR")
ErrSubmitReviewOnClosedPR represents an error when an user tries to submit an approve or reject review associated to a closed or merged PR.
var ErrUserHasNoPermissionForAction = errors.New("user not allowed to do this action")
Functions ¶
func AddTestPullRequestTask ¶ added in v1.11.0
func AddTestPullRequestTask(opts TestPullRequestOptions)
AddTestPullRequestTask adds new test tasks by given head/base repository and head/base branch, and generate new patch for testing as needed.
func AdjustPullsCausedByBranchDeleted ¶
func AdjustPullsCausedByBranchDeleted(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, branch string) error
AdjustPullsCausedByBranchDeleted close all the pull requests who's head branch is the branch Or Close all the plls who's base branch is the branch if setting.Repository.PullRequest.RetargetChildrenOnMerge is false. If it's true, Retarget all these pulls to the default branch.
func AttemptThreeWayMerge ¶ added in v1.17.0
func AttemptThreeWayMerge(ctx context.Context, gitPath string, gitRepo *git.Repository, base, ours, theirs, description string) (bool, []string, error)
AttemptThreeWayMerge will attempt to three way merge using git read-tree and then follow the git merge-one-file algorithm to attempt to resolve basic conflicts
func ChangeTargetBranch ¶ added in v1.11.0
func ChangeTargetBranch(ctx context.Context, pr *issues_model.PullRequest, doer *user_model.User, targetBranch string) (err error)
ChangeTargetBranch changes the target branch of this pull request, as the given user.
func CheckFileProtection ¶ added in v1.13.0
func CheckFileProtection(repo *git.Repository, branchName, oldCommitID, newCommitID string, patterns []glob.Glob, limit int, env []string) ([]string, error)
CheckFileProtection check file Protection
func CheckPRsForBaseBranch ¶ added in v1.19.0
func CheckPRsForBaseBranch(ctx context.Context, baseRepo *repo_model.Repository, baseBranchName string) error
CheckPRsForBaseBranch check all pulls with baseBrannch
func CheckPullBranchProtections ¶ added in v1.17.0
func CheckPullBranchProtections(ctx context.Context, pr *issues_model.PullRequest, skipProtectedFilesCheck bool) (err error)
CheckPullBranchProtections checks whether the PR is ready to be merged (reviews and status checks)
func CheckPullMergeable ¶ added in v1.22.0
func CheckPullMergeable(stdCtx context.Context, doer *user_model.User, perm *access_model.Permission, pr *issues_model.PullRequest, mergeCheckType MergeCheckType, adminForceMerge bool) error
CheckPullMergeable check if the pull mergeable based on all conditions (branch protection, merge options, ...)
func CheckUnprotectedFiles ¶ added in v1.16.0
func CheckUnprotectedFiles(repo *git.Repository, branchName, oldCommitID, newCommitID string, patterns []glob.Glob, env []string) (bool, error)
CheckUnprotectedFiles check if the commit only touches unprotected files
func CloseRepoBranchesPulls ¶ added in v1.11.0
func CloseRepoBranchesPulls(ctx context.Context, doer *user_model.User, repo *repo_model.Repository) error
CloseRepoBranchesPulls close all pull requests which head branches are in the given repository, but only whose base repo is not in the given repository
func CreateCodeComment ¶ added in v1.11.0
func CreateCodeComment(ctx context.Context, doer *user_model.User, gitRepo *git.Repository, issue *issues_model.Issue, line int64, content, treePath string, pendingReview bool, replyReviewID int64, latestCommitID string, attachments []string) (*issues_model.Comment, error)
CreateCodeComment creates a comment on the code line
func CreateOrUpdateProtectedBranch ¶
func CreateOrUpdateProtectedBranch(ctx context.Context, repo *repo_model.Repository, protectBranch *git_model.ProtectedBranch, whitelistOptions git_model.WhitelistOptions, ) error
func CreatePushPullComment ¶ added in v1.17.4
func CreatePushPullComment(ctx context.Context, pusher *user_model.User, pr *issues_model.PullRequest, oldCommitID, newCommitID string) (comment *issues_model.Comment, err error)
CreatePushPullComment create push code to pull base comment
func DismissApprovalReviews ¶ added in v1.20.2
func DismissApprovalReviews(ctx context.Context, doer *user_model.User, pull *issues_model.PullRequest) error
DismissApprovalReviews dismiss all approval reviews because of new commits
func DismissReview ¶ added in v1.14.0
func DismissReview(ctx context.Context, reviewID, repoID int64, message string, doer *user_model.User, isDismiss, dismissPriors bool) (comment *issues_model.Comment, err error)
DismissReview dismissing stale review by repo admin
func DownloadDiffOrPatch ¶ added in v1.11.0
func DownloadDiffOrPatch(ctx context.Context, pr *issues_model.PullRequest, w io.Writer, patch, binary bool) error
DownloadDiffOrPatch will write the patch for the pr to the writer
func GetDefaultMergeMessage ¶ added in v1.17.0
func GetDefaultMergeMessage(ctx context.Context, baseGitRepo *git.Repository, pr *issues_model.PullRequest, mergeStyle repo_model.MergeStyle) (message, body string, err error)
GetDefaultMergeMessage returns default message used when merging pull request
func GetDiverging ¶ added in v1.12.0
func GetDiverging(ctx context.Context, pr *issues_model.PullRequest) (*git.DivergeObject, error)
GetDiverging determines how many commits a PR is ahead or behind the PR base branch
func GetIssuesAllCommitStatus ¶ added in v1.17.0
func GetIssuesAllCommitStatus(ctx context.Context, issues issues_model.IssueList) (map[int64][]*git_model.CommitStatus, map[int64]*git_model.CommitStatus, error)
GetIssuesAllCommitStatus returns a map of issue ID to a list of all statuses for the most recent commit as well as a map of issue ID to only the commit's latest status
func GetIssuesLastCommitStatus ¶ added in v1.14.1
func GetIssuesLastCommitStatus(ctx context.Context, issues issues_model.IssueList) (map[int64]*git_model.CommitStatus, error)
GetIssuesLastCommitStatus returns a map of issue ID to the most recent commit's latest status
func GetPullRequestCommitStatusState ¶ added in v1.11.0
func GetPullRequestCommitStatusState(ctx context.Context, pr *issues_model.PullRequest) (structs.CommitStatusState, error)
GetPullRequestCommitStatusState returns pull request merged commit status state
func GetReviewerTeams ¶ added in v1.22.4
func GetReviewerTeams(ctx context.Context, repo *repo_model.Repository) ([]*organization.Team, error)
GetReviewerTeams get all teams can be requested to review
func GetReviewers ¶ added in v1.22.4
func GetReviewers(ctx context.Context, repo *repo_model.Repository, doerID, posterID int64) ([]*user_model.User, error)
GetReviewers get all users can be requested to review: - Poster should not be listed - For collaborator, all users that have read access or higher to the repository. - For repository under organization, users under the teams which have read permission or higher of pull request unit - Owner will be listed if it's not an organization, not the poster and not in the list of reviewers
func GetSquashMergeCommitMessages ¶ added in v1.14.0
func GetSquashMergeCommitMessages(ctx context.Context, pr *issues_model.PullRequest) string
GetSquashMergeCommitMessages returns the commit messages between head and merge base (if there is one)
func Init ¶ added in v1.11.0
func Init() error
Init runs the task queue to test all the checking status pull requests
func InitializePullRequests ¶ added in v1.12.0
InitializePullRequests checks and tests untested patches of pull requests.
func InvalidateCodeComments ¶ added in v1.18.4
func InvalidateCodeComments(ctx context.Context, prs issues_model.PullRequestList, doer *user_model.User, repo *git.Repository, branch string) error
InvalidateCodeComments will lookup the prs for code comments which got invalidated by change
func IsCommitStatusContextSuccess ¶
func IsCommitStatusContextSuccess(commitStatuses []*git_model.CommitStatus, requiredContexts []string) bool
IsCommitStatusContextSuccess returns true if all required status check contexts succeed.
func IsErrDismissRequestOnClosedPR ¶ added in v1.22.0
IsErrDismissRequestOnClosedPR checks if an error is an ErrDismissRequestOnClosedPR.
func IsErrFilePathProtected ¶
IsErrFilePathProtected checks if an error is an ErrFilePathProtected.
func IsErrInvalidMergeStyle ¶
IsErrInvalidMergeStyle checks if an error is a ErrInvalidMergeStyle.
func IsErrMergeConflicts ¶
IsErrMergeConflicts checks if an error is a ErrMergeConflicts.
func IsErrMergeDivergingFastForwardOnly ¶
IsErrMergeDivergingFastForwardOnly checks if an error is a ErrMergeDivergingFastForwardOnly.
func IsErrMergeUnrelatedHistories ¶
IsErrMergeUnrelatedHistories checks if an error is a ErrMergeUnrelatedHistories.
func IsErrPullRequestHasMerged ¶
IsErrPullRequestHasMerged checks if an error is a ErrPullRequestHasMerged.
func IsErrRebaseConflicts ¶
IsErrRebaseConflicts checks if an error is a ErrRebaseConflicts.
func IsErrSHADoesNotMatch ¶
IsErrSHADoesNotMatch checks if an error is a ErrSHADoesNotMatch.
func IsHeadEqualWithBranch ¶ added in v1.12.0
func IsHeadEqualWithBranch(ctx context.Context, pr *issues_model.PullRequest, branchName string) (bool, error)
IsHeadEqualWithBranch returns if the commits of branchName are available in pull request head
func IsPullCommitStatusPass ¶
func IsPullCommitStatusPass(ctx context.Context, pr *issues_model.PullRequest) (bool, error)
IsPullCommitStatusPass returns if all required status checks PASS
func IsUserAllowedToMerge ¶ added in v1.12.0
func IsUserAllowedToMerge(ctx context.Context, pr *issues_model.PullRequest, p access_model.Permission, user *user_model.User) (bool, error)
IsUserAllowedToMerge check if user is allowed to merge PR with given permissions and branch protections
func IsUserAllowedToUpdate ¶ added in v1.12.0
func IsUserAllowedToUpdate(ctx context.Context, pull *issues_model.PullRequest, user *user_model.User) (mergeAllowed, rebaseAllowed bool, err error)
IsUserAllowedToUpdate check if user is allowed to update PR with given permissions and branch protections
func LFSPush ¶
func LFSPush(ctx context.Context, tmpBasePath, mergeHeadSHA, mergeBaseSHA string, pr *issues_model.PullRequest) error
LFSPush pushes lfs objects referred to in new commits in the head repository from the base repository
func Merge ¶
func Merge(ctx context.Context, pr *issues_model.PullRequest, doer *user_model.User, baseGitRepo *git.Repository, mergeStyle repo_model.MergeStyle, expectedHeadCommitID, message string, wasAutoMerged bool) error
Merge merges pull request to base repository. Caller should check PR is ready to be merged (review and status checks)
func MergeRequiredContextsCommitStatus ¶ added in v1.11.0
func MergeRequiredContextsCommitStatus(commitStatuses []*git_model.CommitStatus, requiredContexts []string) structs.CommitStatusState
MergeRequiredContextsCommitStatus returns a commit status state for given required contexts
func MergedManually ¶ added in v1.14.0
func MergedManually(ctx context.Context, pr *issues_model.PullRequest, doer *user_model.User, baseGitRepo *git.Repository, commitID string) error
MergedManually mark pr as merged manually
func NewPullRequest ¶
func NewPullRequest(ctx context.Context, opts *NewPullRequestOptions) error
NewPullRequest creates new pull request with labels for repository.
func PushToBaseRepo ¶ added in v1.11.0
func PushToBaseRepo(ctx context.Context, pr *issues_model.PullRequest) (err error)
PushToBaseRepo pushes commits from branches of head repository to corresponding branches of base repository. FIXME: Only push branches that are actually updates?
func SetAllowEdits ¶ added in v1.17.0
func SetAllowEdits(ctx context.Context, doer *user_model.User, pr *issues_model.PullRequest, allow bool) error
SetAllowEdits allow edits from maintainers to PRs
func SetMerged ¶
func SetMerged(ctx context.Context, pr *issues_model.PullRequest, mergedCommitID string, mergedTimeStamp timeutil.TimeStamp, merger *user_model.User, mergeStatus issues_model.PullRequestStatus) (bool, error)
SetMerged sets a pull request to merged and closes the corresponding issue
func StartPullRequestCheckDelayable ¶
func StartPullRequestCheckDelayable(ctx context.Context, pr *issues_model.PullRequest)
StartPullRequestCheckDelayable will delay the check if the pull request was not updated recently. When the "base" branch gets updated, all PRs targeting that "base" branch need to re-check whether they are mergeable. When there are too many stale PRs, each "base" branch update will consume a lot of system resources. So we can delay the checks for PRs that were not updated recently, only mark their status as "checking", and then next time when these PRs are updated or viewed, the real checks will run.
func StartPullRequestCheckImmediately ¶
func StartPullRequestCheckImmediately(ctx context.Context, pr *issues_model.PullRequest)
func StartPullRequestCheckOnView ¶
func StartPullRequestCheckOnView(ctx context.Context, pr *issues_model.PullRequest)
func SubmitReview ¶ added in v1.11.0
func SubmitReview(ctx context.Context, doer *user_model.User, gitRepo *git.Repository, issue *issues_model.Issue, reviewType issues_model.ReviewType, content, commitID string, attachmentUUIDs []string) (*issues_model.Review, *issues_model.Comment, error)
SubmitReview creates a review out of the existing pending review or creates a new one if no pending review exist
func Update ¶ added in v1.12.0
func Update(ctx context.Context, pr *issues_model.PullRequest, doer *user_model.User, message string, rebase bool) error
Update updates pull request with base branch.
func UpdatePullsRefs ¶ added in v1.22.0
func UpdatePullsRefs(ctx context.Context, repo *repo_model.Repository, update *repo_module.PushUpdateOptions)
UpdatePullsRefs update all the PRs head file pointers like /refs/pull/1/head so that it will be dependent by other operations
func UpdateRef ¶ added in v1.16.0
func UpdateRef(ctx context.Context, pr *issues_model.PullRequest) (err error)
UpdateRef update refs/pull/id/head directly for agit flow pull request
Types ¶
type CommitInfo ¶ added in v1.21.0
type CommitInfo struct { Summary string `json:"summary"` CommitterOrAuthorName string `json:"committer_or_author_name"` ID string `json:"id"` ShortSha string `json:"short_sha"` Time string `json:"time"` }
func GetPullCommits ¶ added in v1.21.0
func GetPullCommits(ctx *gitea_context.Context, issue *issues_model.Issue) ([]CommitInfo, string, error)
GetPullCommits returns all commits on given pull request and the last review commit sha Attention: The last review commit sha must be from the latest review whose commit id is not empty. So the type of the latest review cannot be "ReviewTypeRequest".
type ErrDismissRequestOnClosedPR ¶ added in v1.22.0
type ErrDismissRequestOnClosedPR struct{}
ErrDismissRequestOnClosedPR represents an error when an user tries to dismiss a review associated to a closed or merged PR.
func (ErrDismissRequestOnClosedPR) Error ¶ added in v1.22.0
func (err ErrDismissRequestOnClosedPR) Error() string
func (ErrDismissRequestOnClosedPR) Unwrap ¶ added in v1.22.0
func (err ErrDismissRequestOnClosedPR) Unwrap() error
type ErrFilePathProtected ¶
ErrFilePathProtected represents a "FilePathProtected" kind of error.
func (ErrFilePathProtected) Error ¶
func (err ErrFilePathProtected) Error() string
func (ErrFilePathProtected) Unwrap ¶
func (err ErrFilePathProtected) Unwrap() error
type ErrInvalidMergeStyle ¶
type ErrInvalidMergeStyle struct { ID int64 Style repo_model.MergeStyle }
ErrInvalidMergeStyle represents an error if merging with disabled merge strategy
func (ErrInvalidMergeStyle) Error ¶
func (err ErrInvalidMergeStyle) Error() string
func (ErrInvalidMergeStyle) Unwrap ¶
func (err ErrInvalidMergeStyle) Unwrap() error
type ErrMergeConflicts ¶
type ErrMergeConflicts struct { Style repo_model.MergeStyle StdOut string StdErr string Err error }
ErrMergeConflicts represents an error if merging fails with a conflict
func (ErrMergeConflicts) Error ¶
func (err ErrMergeConflicts) Error() string
type ErrMergeDivergingFastForwardOnly ¶
ErrMergeDivergingFastForwardOnly represents an error if a fast-forward-only merge fails because the branches diverge
func (ErrMergeDivergingFastForwardOnly) Error ¶
func (err ErrMergeDivergingFastForwardOnly) Error() string
type ErrMergeUnrelatedHistories ¶
type ErrMergeUnrelatedHistories struct {}
ErrMergeUnrelatedHistories represents an error if merging fails due to unrelated histories
func (ErrMergeUnrelatedHistories) Error ¶
func (err ErrMergeUnrelatedHistories) Error() string
type ErrPullRequestHasMerged ¶
type ErrPullRequestHasMerged struct { ID int64 IssueID int64 HeadRepoID int64 BaseRepoID int64 HeadBranch string BaseBranch string }
ErrPullRequestHasMerged represents a "PullRequestHasMerged"-error
func (ErrPullRequestHasMerged) Error ¶
func (err ErrPullRequestHasMerged) Error() string
Error does pretty-printing :D
type ErrRebaseConflicts ¶
type ErrRebaseConflicts struct { Style repo_model.MergeStyle CommitSHA string StdOut string StdErr string Err error }
ErrRebaseConflicts represents an error if rebase fails with a conflict
func (ErrRebaseConflicts) Error ¶
func (err ErrRebaseConflicts) Error() string
type ErrSHADoesNotMatch ¶
ErrSHADoesNotMatch represents a "SHADoesNotMatch" kind of error.
func (ErrSHADoesNotMatch) Error ¶
func (err ErrSHADoesNotMatch) Error() string
type MergeCheckType ¶ added in v1.18.5
type MergeCheckType int
const ( MergeCheckTypeGeneral MergeCheckType = iota // general merge checks for "merge", "rebase", "squash", etc MergeCheckTypeManually // Manually Merged button (mark a PR as merged manually) MergeCheckTypeAuto // Auto Merge (Scheduled Merge) After Checks Succeed )
type NewPullRequestOptions ¶ added in v1.23.0
type NewPullRequestOptions struct { Repo *repo_model.Repository Issue *issues_model.Issue LabelIDs []int64 AttachmentUUIDs []string PullRequest *issues_model.PullRequest AssigneeIDs []int64 Reviewers []*user_model.User TeamReviewers []*organization.Team }