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
/command support #17
Comments
Hi @mscoutermarsh cc this tweet |
Random thought - this'd be a weird API, because we'd need to ensure that its only triggered by class Toolkit {
public command (name: string, handler: () => void) {
if (this.context.event !== 'issue_comment') return
// ...
}
} Folks can use the |
+1 to this API. I feel like registering a command like this would be more explicit than a generic event emitter/subscription API (e.g. To clarify #17 (comment), are you stating that the only event a command can respond to is the |
@macklinu thanks for sharing your thoughts!
Yeah, it'd be to avoid a "gotcha" where folks use the API in an action that cannot, by definition, trigger the command. I'd want to avoid people accidentally thinking that a It might be worth building up a list of what those events are - |
@JasonEtco We should also ensure it doesn't respond to bots, to prevent infinite loop situations (helpful when a Bot responds with a list of commands you can use) We do this in the jira middleware: if (context.payload.sender.type === 'Bot') {
return
} |
It'd be great to provide a
/command
abstraction - something like:Or maybe...
Memorializing a conversation in this tweet:
I think that @mscoutermarsh should work on this 😎😈
The text was updated successfully, but these errors were encountered: