Skip to content

make space before bot command optional #324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 20, 2025
Merged

Conversation

boegel
Copy link
Contributor

@boegel boegel commented Jun 19, 2025

bot:build ... or bot: build should both work just fine, no reason to require a hard space in between

`bot:build ...` or `bot: build` should both work just fine, no reason to require a hard space in between
Copy link
Contributor

@trz42 trz42 left a comment

Choose a reason for hiding this comment

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

Good idea 👍

Have you tested it?

@boegel
Copy link
Contributor Author

boegel commented Jun 19, 2025

Good idea 👍

Have you tested it?

I hadn't yet actually, and when I did I found a bug:

[20250619-T11:58:38] get_bot_command(): searching for bot command in 'bot:build instance:vsc-bot-gent arch:RHEL9/zen2-ib'
[20250619-T11:58:38] WARNING: A crash occurred!
Traceback (most recent call last):
  File "/venv_apps_bot_p39/lib64/python3.9/site-packages/pyghee/lib.py", line 194, in process_event
    self.handle_event(event_info, log_file=log_file)
  File "/venv_apps_bot_p39/lib64/python3.9/site-packages/pyghee/lib.py", line 124, in handle_event
    handler(event_info, log_file=log_file)
  File "/eessi-bot-software-layer/eessi_bot_event_handler.py", line 201, in handle_issue_comment_event
    if not contains_any_bot_command(comment_received):
  File "/eessi-bot-software-layer/tools/commands.py", line 33, in contains_any_bot_command
    return any(map(get_bot_command, body.split('\n')))
  File "/eessi-bot-software-layer/tools/commands.py", line 52, in get_bot_command
    return match.group(1).rstrip()
AttributeError: 'NoneType' object has no attribute 'rstrip'

fixed in 66005da + 8eec372, also added log messages

Copy link
Contributor

@trz42 trz42 left a comment

Choose a reason for hiding this comment

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

lgtm

@trz42 trz42 merged commit 4b7c50c into develop Jun 20, 2025
7 checks passed
@boegel boegel deleted the bot-command-optional-space branch June 20, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants