question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It’d be great to provide a /command abstraction - something like:

// In an issue/PR comment, `/pizza dominos pepperoni`
toolkit.command('pizza', async args => {
  // args -> ['dominos', 'pepperoni']
})

Or maybe…

// on instead of command
toolkit.on('pizza', async args => console.log(args))

Memorializing a conversation in this tweet:

image

I think that @mscoutermarsh should work on this 😎😈

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tcbyrdcommented, Feb 26, 2019

@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
}
0reactions
JasonEtcocommented, Feb 23, 2019

@macklinu thanks for sharing your thoughts!

To clarify #17 (comment), are you stating that the only event a command can respond to is the issue_comment event and that the docs should explicitly state that?

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 push might trigger a /command 😁

It might be worth building up a list of what those events are - issues, issue_comment, pull_request, commit_comment, pull_request_review_comment, pull_request_review I think? Basically anything that can have a “body” 🤔

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command support definition and meaning - Collins Dictionary
Command support definition: If someone in authority commands you to do something, they tell you that you must do it.... | Meaning, pronunciation ......
Read more >
Command - KW Answers
Help and Support · Working with KWRI Tech Support: Tips and Best Practices · KW Support Cheat Sheet: Who to Contact for Common...
Read more >
Command Support - MyNavyHR
Responsible for a wide variety of command support functions including Workforce Development, Personnel Security, Safety, Directives Management and Logistics ...
Read more >
Support | Command Alkon
Have a question? Or perhaps you need support on an issue? Command Alkon is here to help. Get in touch for the answers...
Read more >
The challenging world of command and support relationships
In the most basic sense, Field Manual 6-0 says that command relationships define command responsibility and authority while support ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found