pull

package
v1.11.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 31 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTestPullRequestTask added in v1.11.0

func AddTestPullRequestTask(doer *models.User, repoID int64, branch string, isSync bool)

AddTestPullRequestTask adds new test tasks by given head/base repository and head/base branch, and generate new patch for testing as needed.

func AddToTaskQueue added in v1.11.0

func AddToTaskQueue(pr *models.PullRequest)

AddToTaskQueue adds itself to pull request test task queue.

func ChangeTargetBranch added in v1.11.0

func ChangeTargetBranch(pr *models.PullRequest, doer *models.User, targetBranch string) (err error)

ChangeTargetBranch changes the target branch of this pull request, as the given user.

func CreateCodeComment added in v1.11.0

func CreateCodeComment(doer *models.User, issue *models.Issue, line int64, content string, treePath string, isReview bool, replyReviewID int64) (*models.Comment, error)

CreateCodeComment creates a comment on the code line

func DownloadDiff added in v1.11.0

func DownloadDiff(pr *models.PullRequest, w io.Writer, patch bool) error

DownloadDiff will write the patch for the pr to the writer

func DownloadDiffOrPatch added in v1.11.0

func DownloadDiffOrPatch(pr *models.PullRequest, w io.Writer, patch bool) error

DownloadDiffOrPatch will write the patch for the pr to the writer

func DownloadPatch added in v1.11.0

func DownloadPatch(pr *models.PullRequest, w io.Writer, patch bool) error

DownloadPatch will write the patch for the pr to the writer

func Init added in v1.11.0

func Init()

Init runs the task queue to test all the checking status pull requests

func IsCommitStatusContextSuccess

func IsCommitStatusContextSuccess(commitStatuses []*models.CommitStatus, requiredContexts []string) bool

IsCommitStatusContextSuccess returns true if all required status check contexts succeed.

func IsPullCommitStatusPass

func IsPullCommitStatusPass(pr *models.PullRequest) (bool, error)

IsPullCommitStatusPass returns if all required status checks PASS

func LFSPush

func LFSPush(tmpBasePath, mergeHeadSHA, mergeBaseSHA string, pr *models.PullRequest) error

LFSPush pushes lfs objects referred to in new commits in the head repository from the base repository

func Merge

func Merge(pr *models.PullRequest, doer *models.User, baseGitRepo *git.Repository, mergeStyle models.MergeStyle, message string) (err error)

Merge merges pull request to base repository. FIXME: add repoWorkingPull make sure two merges does not happen at same time.

func NewPullRequest

func NewPullRequest(repo *models.Repository, pull *models.Issue, labelIDs []int64, uuids []string, pr *models.PullRequest, assigneeIDs []int64) error

NewPullRequest creates new pull request with labels for repository.

func PushToBaseRepo added in v1.11.0

func PushToBaseRepo(pr *models.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 SubmitReview added in v1.11.0

func SubmitReview(doer *models.User, issue *models.Issue, reviewType models.ReviewType, content string) (*models.Review, *models.Comment, error)

SubmitReview creates a review out of the existing pending review or creates a new one if no pending review exist

func TestPatch added in v1.11.0

func TestPatch(pr *models.PullRequest) error

TestPatch will test whether a simple patch will apply

func TestPullRequests added in v1.11.0

func TestPullRequests(ctx context.Context)

TestPullRequests checks and tests untested patches of pull requests. TODO: test more pull requests at same time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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