package
1.24.0-dev
Repository: https://github.com/go-gitea/gitea.git
Documentation: pkg.go.dev

# Functions

AddTestPullRequestTask adds new test tasks by given head/base repository and head/base branch, and generate new patch for testing as needed.
AddToTaskQueue adds itself to pull request test task queue.
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.
ChangeTargetBranch changes the target branch of this pull request, as the given user.
CheckFileProtection check file Protection.
CheckPRsForBaseBranch check all pulls with baseBrannch.
CheckPullBranchProtections checks whether the PR is ready to be merged (reviews and status checks).
CheckPullMergeable check if the pull mergeable based on all conditions (branch protection, merge options, ...).
CheckUnprotectedFiles check if the commit only touches unprotected files.
CloseBranchPulls close all the pull requests who's head branch is the branch.
CloseRepoBranchesPulls close all pull requests which head branches are in the given repository, but only whose base repo is not in the given repository.
CreateCodeComment creates a comment on the code line.
CreatePushPullComment create push code to pull base comment.
DismissApprovalReviews dismiss all approval reviews because of new commits.
DismissReview dismissing stale review by repo admin.
DownloadDiffOrPatch will write the patch for the pr to the writer.
GetDefaultMergeMessage returns default message used when merging pull request.
GetDiverging determines how many commits a PR is ahead or behind the PR base branch.
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.
GetIssuesLastCommitStatus returns a map of issue ID to the most recent commit's latest status.
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.
GetPullRequestCommitStatusState returns pull request merged commit status state.
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.
GetReviewerTeams get all teams can be requested to review.
GetSquashMergeCommitMessages returns the commit messages between head and merge base (if there is one).
Init runs the task queue to test all the checking status pull requests.
InitializePullRequests checks and tests untested patches of pull requests.
InvalidateCodeComments will lookup the prs for code comments which got invalidated by change.
IsCommitStatusContextSuccess returns true if all required status check contexts succeed.
IsErrDismissRequestOnClosedPR checks if an error is an ErrDismissRequestOnClosedPR.
IsHeadEqualWithBranch returns if the commits of branchName are available in pull request head.
IsPullCommitStatusPass returns if all required status checks PASS.
IsUserAllowedToMerge check if user is allowed to merge PR with given permissions and branch protections.
IsUserAllowedToUpdate check if user is allowed to update PR with given permissions and branch protections.
LFSPush pushes lfs objects referred to in new commits in the head repository from the base repository.
Merge merges pull request to base repository.
MergedManually mark pr as merged manually.
MergeRequiredContextsCommitStatus returns a commit status state for given required contexts.
NewPullRequest creates new pull request with labels for repository.
PushToBaseRepo pushes commits from branches of head repository to corresponding branches of base repository.
RetargetBranchPulls change target branch for all pull requests whose base branch is the branch Both branch and targetBranch must be in the same repo (for security reasons).
RetargetChildrenOnMerge retarget children pull requests on merge if possible.
SetAllowEdits allow edits from maintainers to PRs.
SubmitReview creates a review out of the existing pending review or creates a new one if no pending review exist.
TestPatch will test whether a simple patch will apply.
Update updates pull request with base branch.
UpdatePullsRefs update all the PRs head file pointers like /refs/pull/1/head so that it will be dependent by other operations.
UpdateRef update refs/pull/id/head directly for agit flow pull request.

# Constants

Auto Merge (Scheduled Merge) After Checks Succeed.
general merge checks for "merge", "rebase", "squash", etc.
Manually Merged button (mark a PR as merged manually).

# Variables

ErrSubmitReviewOnClosedPR represents an error when an user tries to submit an approve or reject review associated to a closed or merged PR.

# Structs

ErrDismissRequestOnClosedPR represents an error when an user tries to dismiss a review associated to a closed or merged PR.

# Type aliases