Fix Migration 136 (be less aggressive to open pulls missing git files) (#11072)

* be less aggressife to open pulls when migrating

* remove unused
release/v1.15
6543 2020-04-15 00:16:07 +02:00 committed by GitHub
parent 0ad0357233
commit d66b9a4690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 6 deletions

View File

@ -42,12 +42,6 @@ func addCommitDivergenceToPulls(x *xorm.Engine) error {
for _, pr := range results {
divergence, err := pull_service.GetDiverging(pr)
if err != nil {
if err = pr.LoadIssue(); err != nil {
return fmt.Errorf("pr.LoadIssue()[%d]: %v", pr.ID, err)
}
if !pr.Issue.IsClosed {
return fmt.Errorf("GetDiverging: %v", err)
}
log.Warn("Could not recalculate Divergence for pull: %d", pr.ID)
pr.CommitsAhead = 0
pr.CommitsBehind = 0