summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/doctor/fix16961.go6
-rw-r--r--modules/doctor/mergebase.go8
2 files changed, 10 insertions, 4 deletions
diff --git a/modules/doctor/fix16961.go b/modules/doctor/fix16961.go
index 92c77ba80f..92c4418505 100644
--- a/modules/doctor/fix16961.go
+++ b/modules/doctor/fix16961.go
@@ -302,7 +302,11 @@ func fixBrokenRepoUnits16961(ctx context.Context, logger log.Logger, autofix boo
}
if !autofix {
- logger.Warn("Found %d broken repo_units", count)
+ if count == 0 {
+ logger.Info("Found no broken repo_units")
+ } else {
+ logger.Warn("Found %d broken repo_units", count)
+ }
return nil
}
logger.Info("Fixed %d broken repo_units", count)
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