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 <philwo@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
changes/48/5930648/5
Philipp Wollermann 7 months ago committed by LUCI CQ
parent 20b9bdcace
commit c4d75a1519

@ -970,11 +970,12 @@ def CheckInfraFreeze(input_api,
else: else:
report_type = output_api.PresubmitError report_type = output_api.PresubmitError
return [ return [
report_type('There is a prod infra freeze in effect from {} until {}:\n' report_type(
'There is a prod infra freeze in effect from {} until {}:\n'
'\t{}\n\n' '\t{}\n\n'
'The following files cannot be modified:\n {}.\n\n' 'The following files cannot be modified:\n {}.\n\n'
'Set git-footer "{}" to override.'.format( 'Add "{}: <reason>" to the end of your commit message to override.'.
_FREEZE_START, _FREEZE_END, _FREEZE_DETAILS, format(_FREEZE_START, _FREEZE_END, _FREEZE_DETAILS,
'\n '.join(files), _IGNORE_FREEZE_FOOTER)) '\n '.join(files), _IGNORE_FREEZE_FOOTER))
] ]

Loading…
Cancel
Save