mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Fix inconsistency in doctor output (#19836)
* Fix inconsistency in doctor output - Use `logger.Info` instead of `logger.Warn` when no errors were found. * Update modules/doctor/fix16961.go Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user