Skip to content

Commit a68761d

Browse files
unknwondna2github
authored andcommitted
pull: ignore PR status check if head repository is missing (gogs#7004)
1 parent aad13eb commit a68761d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

internal/db/pull.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -621,11 +621,6 @@ func (pr *PullRequest) UpdateCols(cols ...string) error {
621621

622622
// UpdatePatch generates and saves a new patch.
623623
func (pr *PullRequest) UpdatePatch() (err error) {
624-
if pr.HeadRepo == nil {
625-
log.Trace("PullRequest[%d].UpdatePatch: ignored corrupted data", pr.ID)
626-
return nil
627-
}
628-
629624
headGitRepo, err := git.Open(pr.HeadRepo.RepoPath())
630625
if err != nil {
631626
return fmt.Errorf("open repository: %v", err)
@@ -759,6 +754,11 @@ func (prs PullRequestList) LoadAttributes() error {
759754

760755
func addHeadRepoTasks(prs []*PullRequest) {
761756
for _, pr := range prs {
757+
if pr.HeadRepo == nil {
758+
log.Trace("addHeadRepoTasks[%d]: missing head repository", pr.ID)
759+
continue
760+
}
761+
762762
log.Trace("addHeadRepoTasks[%d]: composing new test task", pr.ID)
763763
if err := pr.UpdatePatch(); err != nil {
764764
log.Error("UpdatePatch: %v", err)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy