Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/tvmbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: show ci/scripts/github/github_tvmbot.py
run: |
set -eux
if ! [ -f ci/scripts/github/github_tvmbot.py ]; then
echo "Error: ci/scripts/github/github_tvmbot.py not found"
exit 1
fi
cat ci/scripts/github/github_tvmbot.py
- name: Run tvm-bot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions ci/scripts/github/github_tvmbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,10 +740,12 @@ def run(pr: PR):

# Find the code to run for the command from the user
user_command = body.lstrip("@tvm-bot").strip()
logging.info(f"user_command='{user_command}'")
command_to_run = None
for command in [Merge, Rerun]:
if user_command in command.triggers:
command_to_run = command
logging.info(f"Found command to run: {command.__name__}")
Comment on lines +743 to +748
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These logging statements appear to be for debugging. For this purpose, it is better to use logging.debug() instead of logging.info(). This allows for more granular control over log verbosity, so that debug messages don't clutter production logs. You may need to adjust the logging configuration to make DEBUG messages visible during testing.

Suggested change
logging.info(f"user_command='{user_command}'")
command_to_run = None
for command in [Merge, Rerun]:
if user_command in command.triggers:
command_to_run = command
logging.info(f"Found command to run: {command.__name__}")
logging.debug(f"user_command='{user_command}'")
command_to_run = None
for command in [Merge, Rerun]:
if user_command in command.triggers:
command_to_run = command
logging.debug(f"Found command to run: {command.__name__}")

break

if command_to_run is None:
Expand Down
Loading