logger.Warn("Unable to get merge base for PR ID %d, #%d onto %s in %s/%s. Error: %v & %v",pr.ID,pr.Index,pr.BaseBranch,pr.BaseRepo.OwnerName,pr.BaseRepo.Name,err,err2)
logger.Warn("Unable to get parents for merged PR ID %d, #%d onto %s in %s/%s. Error: %v",pr.ID,pr.Index,pr.BaseBranch,pr.BaseRepo.OwnerName,pr.BaseRepo.Name,err)
logger.Warn("Unable to get merge base for merged PR ID %d, #%d onto %s in %s/%s. Error: %v",pr.ID,pr.Index,pr.BaseBranch,pr.BaseRepo.OwnerName,pr.BaseRepo.Name,err)
returnnil
}
}
pr.MergeBase=strings.TrimSpace(pr.MergeBase)
ifpr.MergeBase!=oldMergeBase{
ifautofix{
iferr:=pr.UpdateCols("merge_base");err!=nil{
logger.Critical("Failed to update merge_base. ERROR: %v",err)
returnfmt.Errorf("Failed to update merge_base. ERROR: %v",err)
}
}else{
logger.Info("#%d onto %s in %s/%s: MergeBase should be %s but is %s",pr.Index,pr.BaseBranch,pr.BaseRepo.OwnerName,pr.BaseRepo.Name,oldMergeBase,pr.MergeBase)
}
numPRsUpdated++
}
returnnil
})
})
ifautofix{
logger.Info("%d PR mergebases updated of %d PRs total in %d repos",numPRsUpdated,numPRs,numRepos)