-
Notifications
You must be signed in to change notification settings - Fork 77
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
small: Add documentation link on unknown commands #1815
Conversation
src/zulip.rs
Outdated
Ok(Some(String::from("Unknown command"))) | ||
Ok(Some(String::from("Unknown command, check triagebot's documentation at <https://forge.rust-lang.org/triagebot/notifications.html>"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the brackets around the link needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's kinda the default formatting for links over the web, it's just a way to signify it. It isn't necessary for Zulip to parse it as a clickable link.
If it's too ugly I'll just modify it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this link to the notifications page? There are other features that accept Zulip commands, and I'm concerned it could be confusing for the user since it could imply that notifications are the only commands it accepts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was having problems finding the notifications page, so I didn't notice that that implementation is the one that also handles meetings. Should be fixed now (I added another message for manual triggers @ing triagebot)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apart from a small cosmetic nit, I think it 's reasonable as a stopgap solution. And, yes, better would be a help
command (but that's a bit more work)
7703e34
to
85a6af7
Compare
_ => { | ||
return Ok(Some( | ||
String::from( | ||
"Unknown command, check triagebot's documentation at https://forge.rust-lang.org/triagebot/index.html#common-command-summary" | ||
) | ||
)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect ignoring text here was intentional. Perhaps @Mark-Simulacrum could elaborate on why it was done this way? I could guess to allow saying something like You can send messages to @**triagebot** to execute certain commands.
, and not get an error message that the word "to" is unexpected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds like a plausible theory; it also seems like this is just duplicate effort - we'd presumably fall through regardless to the trailing error if there wasn't another command found in the message.
src/zulip.rs
Outdated
} | ||
} | ||
next = words.next(); | ||
} | ||
|
||
Ok(Some(String::from("Unknown command"))) | ||
Ok(Some(String::from("Unknown command, check triagebot's notifications documentation at https://forge.rust-lang.org/triagebot/notifications.html"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still uncertain why this is linking to notifications
, since there are other commands like "work" that are unrelated to those.
Also add link to unknown commands on manual trigger (atting triagebot on a group chat, instead of just on DMs) Remove < & > Change notifications links to index.html
30b1bc5
to
019e104
Compare
It was hard to find the Rust forge page dedicated to documenting triagebot's Zulip commands, and there was no
help
command.With this PR, triagebot links to this page on unknown commands.