@@ -171,18 +171,18 @@ def pop(out, context, line):
171
171
return out
172
172
173
173
174
- def notice_changed (changed : Changed ):
174
+ def warning_changed (changed : Changed ):
175
175
print (
176
- f"::notice file={ changed .file } ,title=Run tests/restyle.sh and re-commit { changed .file } ::File { changed .file } failed clang-format style check. (lines { changed .lines } )"
176
+ f"::warning file={ changed .file } ,title=Run tests/restyle.sh and re-commit { changed .file } ::File { changed .file } failed clang-format style check. (lines { changed .lines } )"
177
177
)
178
178
179
179
180
180
SUMMARY_PATH = pathlib .Path (os .environ .get ("GITHUB_STEP_SUMMARY" , os .devnull ))
181
181
SUMMARY_OUTPUT = SUMMARY_PATH .open ("a" )
182
182
183
-
184
183
def summary_diff (changed : Changed ):
185
184
with contextlib .redirect_stdout (SUMMARY_OUTPUT ):
185
+ print (f"# { changed .file } (suggested change)" )
186
186
print ("```diff" )
187
187
print (changed .hunk )
188
188
print ("```" )
@@ -215,8 +215,8 @@ def run_format(args):
215
215
216
216
def run_assert (args ):
217
217
for changed in changed_files ():
218
- if args .with_notice :
219
- notice_changed (changed )
218
+ if args .with_warnings :
219
+ warning_changed (changed )
220
220
if args .with_summary :
221
221
summary_diff (changed )
222
222
@@ -247,7 +247,7 @@ def run_assert(args):
247
247
assert_ = cmd .add_parser ("assert" )
248
248
assert_ .set_defaults (func = run_assert )
249
249
assert_ .add_argument ("--with-summary" , action = "store_true" )
250
- assert_ .add_argument ("--with-notice " , action = "store_true" )
250
+ assert_ .add_argument ("--with-warnings " , action = "store_true" )
251
251
252
252
args = parser .parse_args ()
253
253
args .func (args )
0 commit comments