MCPcopy
hub / github.com/gogs/gogs / addHeadRepoTasks

Function addHeadRepoTasks

internal/database/pull.go:752–770  ·  view source on GitHub ↗
(prs []*PullRequest)

Source from the content-addressed store, hash-verified

750}
751
752func addHeadRepoTasks(prs []*PullRequest) {
753 for _, pr := range prs {
754 if pr.HeadRepo == nil {
755 log.Trace("addHeadRepoTasks[%d]: missing head repository", pr.ID)
756 continue
757 }
758
759 log.Trace("addHeadRepoTasks[%d]: composing new test task", pr.ID)
760 if err := pr.UpdatePatch(); err != nil {
761 log.Error("UpdatePatch: %v", err)
762 continue
763 } else if err := pr.PushToBaseRepo(); err != nil {
764 log.Error("PushToBaseRepo: %v", err)
765 continue
766 }
767
768 pr.AddToTaskQueue()
769 }
770}
771
772// AddTestPullRequestTask adds new test tasks by given head/base repository and head/base branch,
773// and generate new patch for testing as needed.

Callers 1

AddTestPullRequestTaskFunction · 0.85

Calls 4

UpdatePatchMethod · 0.80
PushToBaseRepoMethod · 0.80
AddToTaskQueueMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected