From c4d75a151973a872ec74e33afb90acde64c48644 Mon Sep 17 00:00:00 2001 From: Philipp Wollermann Date: Tue, 15 Oct 2024 13:33:54 +0000 Subject: [PATCH] presubmit: Improve CheckInfraFreeze error message I didn't understand from the error message how to correctly set the git-footer in my commit message, so that the override takes effect. Maybe this version is easier for new devs? Change-Id: I745d80f0e8068500137d9382f423d0c65a922f5b Ignore-Freeze: Low risk Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5930648 Auto-Submit: Philipp Wollermann Commit-Queue: Josip Sokcevic Reviewed-by: Josip Sokcevic --- presubmit_canned_checks.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index a9eb0309c..1be51aaf9 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -970,12 +970,13 @@ def CheckInfraFreeze(input_api, else: report_type = output_api.PresubmitError return [ - report_type('There is a prod infra freeze in effect from {} until {}:\n' - '\t{}\n\n' - 'The following files cannot be modified:\n {}.\n\n' - 'Set git-footer "{}" to override.'.format( - _FREEZE_START, _FREEZE_END, _FREEZE_DETAILS, - '\n '.join(files), _IGNORE_FREEZE_FOOTER)) + report_type( + 'There is a prod infra freeze in effect from {} until {}:\n' + '\t{}\n\n' + 'The following files cannot be modified:\n {}.\n\n' + 'Add "{}: " to the end of your commit message to override.'. + format(_FREEZE_START, _FREEZE_END, _FREEZE_DETAILS, + '\n '.join(files), _IGNORE_FREEZE_FOOTER)) ]