zulip / zulipbot

GitHub workflow-optimizing bot by @zulip
Other
84 stars 65 forks source link

Wrongful assignation when explaining how Zulipbot works #210

Open johanehinger opened 2 years ago

johanehinger commented 2 years ago

I believe this is a bug. When explaining how to claim an issue using Zulipbot in the Github comments (i.e. the claim command) Zulipbot recognizes this as an attempt to claim the issue, even though it is expressed inside of a code snippet like this:

```console  
@zulipbot claim 
Which in turn obviously produces the following statement: 

```console  
@zulipbot claim 

To see this unexpected behavior in action you can have a look at the issue #19834 in the Zulip main project. Or see the screenshot below.

image

zulipbot commented 2 years ago

Hello @johanehinger!

Thanks for your interest in Zulip! You have attempted to claim an issue without the labels "help wanted", "good first issue". Since you're a new contributor, you can only claim and submit pull requests for issues with the help wanted or good first issue labels.

If this is your first time here, we recommend reading our guide for new contributors before getting started.

zulipbot commented 2 years ago

Hello @johanehinger!

Thanks for your interest in Zulip! You have attempted to claim an issue without the labels "help wanted", "good first issue". Since you're a new contributor, you can only claim and submit pull requests for issues with the help wanted or good first issue labels.

If this is your first time here, we recommend reading our guide for new contributors before getting started.

johanehinger commented 2 years ago

It almost appears that Zulipbot is trying to prove my point here inside this discussion thread. Simply pointing out this unexpected behavior gets misinterpreted as an attempt to claim the issue. Let me know what you think of this.

synicalsyntax commented 2 years ago

We handle codeblock command escaping here: https://github.com/zulip/zulipbot/blob/main/src/events/issue.js#L40 It looks like since you're including a language tag (console) after the 3 starting backticks, zulipbot fails to recognize the command as being inside a command.

Can probably switch to a regex to fix this.