Skip to content

Commit bd2a9a2

Browse files
committed
refactor: clean up run_commit_check by removing dead code path
The PR title check always runs first, so the 'if emitted_failure_output' branch inside it was unreachable. Remove it to reduce nesting and improve readability.
1 parent a59909c commit bd2a9a2

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

main.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -252,16 +252,8 @@ def run_commit_check() -> int:
252252
if PR_TITLE_ENABLED and is_pr_event():
253253
pr_title = get_pr_title()
254254
if pr_title:
255-
cmd_args = ["--message"]
256-
output_prefix = None
257-
if emitted_failure_output:
258-
cmd_args.append("--no-banner")
259-
output_prefix = "\n--- PR Title ---\n"
260255
rc = run_check_command(
261-
cmd_args,
262-
result_file,
263-
input_text=pr_title,
264-
output_prefix=output_prefix,
256+
["--message"], result_file, input_text=pr_title,
265257
)
266258
if rc != 0:
267259
exit_code = max(exit_code, rc)

0 commit comments

Comments
 (0)