diff options
Diffstat (limited to 'modules/doctor/mergebase.go')
-rw-r--r-- | modules/doctor/mergebase.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/doctor/mergebase.go b/modules/doctor/mergebase.go index 8f5c61a5da..61ee9e212b 100644 --- a/modules/doctor/mergebase.go +++ b/modules/doctor/mergebase.go @@ -92,12 +92,14 @@ func checkPRMergeBase(ctx context.Context, logger log.Logger, autofix bool) erro if autofix { logger.Info("%d PR mergebases updated of %d PRs total in %d repos", numPRsUpdated, numPRs, numRepos) } else { - if numPRsUpdated > 0 && err == nil { + if numPRsUpdated == 0 { + logger.Info("All %d PRs in %d repos have a correct mergebase", numPRs, numRepos) + } else if err == nil { logger.Critical("%d PRs with incorrect mergebases of %d PRs total in %d repos", numPRsUpdated, numPRs, numRepos) return fmt.Errorf("%d PRs with incorrect mergebases of %d PRs total in %d repos", numPRsUpdated, numPRs, numRepos) + } else { + logger.Warn("%d PRs with incorrect mergebases of %d PRs total in %d repos", numPRsUpdated, numPRs, numRepos) } - - logger.Warn("%d PRs with incorrect mergebases of %d PRs total in %d repos", numPRsUpdated, numPRs, numRepos) } return err |