Skip to content

Commit c21d6b9

Browse files
committed
Refactor argument name for clarity 🧹
Renamed the argument `comment_on_commit` to `comment` in `main` function of `aicodebot_action.py` and `test_review.py` for better readability and simplicity. This change should make the code more intuitive to understand.
1 parent 68741b9 commit c21d6b9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎aicodebot_action.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import json, os, subprocess, sys
99

1010

11-
def main(comment_on_commit=True):
11+
def main(comment=True):
1212
"""Run the AICodeBot action"""
1313
cli_runner = setup_cli()
1414
review_status, review_comments = review_code(cli_runner)
@@ -17,7 +17,7 @@ def main(comment_on_commit=True):
1717
else:
1818
exit_status = 0
1919

20-
if comment_on_commit:
20+
if comment:
2121
comment_on_commit(review_status, review_comments)
2222
sys.exit(exit_status)
2323

‎tests/test_review.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ def test_commit_review(tmp_path):
1616
assert "aicodebot.yaml" in os.getenv("AICODEBOT_CONFIG_FILE")
1717

1818
# TODO: Mock the github client so we can test the comment on commit as well
19-
aicodebot_action.main(comment_on_commit=False)
19+
aicodebot_action.main(comment=False)

0 commit comments

Comments
 (0)