File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -621,11 +621,6 @@ func (pr *PullRequest) UpdateCols(cols ...string) error {
621
621
622
622
// UpdatePatch generates and saves a new patch.
623
623
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
-
629
624
headGitRepo , err := git .Open (pr .HeadRepo .RepoPath ())
630
625
if err != nil {
631
626
return fmt .Errorf ("open repository: %v" , err )
@@ -759,6 +754,11 @@ func (prs PullRequestList) LoadAttributes() error {
759
754
760
755
func addHeadRepoTasks (prs []* PullRequest ) {
761
756
for _ , pr := range prs {
757
+ if pr .HeadRepo == nil {
758
+ log .Trace ("addHeadRepoTasks[%d]: missing head repository" , pr .ID )
759
+ continue
760
+ }
761
+
762
762
log .Trace ("addHeadRepoTasks[%d]: composing new test task" , pr .ID )
763
763
if err := pr .UpdatePatch (); err != nil {
764
764
log .Error ("UpdatePatch: %v" , err )
You can’t perform that action at this time.
0 commit comments