-
Notifications
You must be signed in to change notification settings - Fork 637
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
Add callback support to SlackBot::{send,reply} #540
Conversation
Allows `SlackBot::{send,reply}` to receive an optional callback. While this is not documented, if a callback is passed to Hubot's `Response::{send,reply}`, Hubot will pass it around. Shamelessly plagiarized from slackapi#440 because I'm in need of this functionality. Fixed the tests to work with @stubs.
Codecov Report
@@ Coverage Diff @@
## master #540 +/- ##
==========================================
- Coverage 85.42% 85.32% -0.10%
==========================================
Files 6 6
Lines 391 402 +11
Branches 84 88 +4
==========================================
+ Hits 334 343 +9
Misses 34 34
- Partials 23 25 +2
Continue to review full report at Codecov.
|
BTW, if you sign the CLA prior to creating a PR (by following the link from the PR template), the status doesn't get checked. 🤓 |
thanks for the contribution. i'm happy to merge this and gain a new contributor! there's just a couple comments that need to be addressed first. |
@aoberoi Finally got around to fixing it up. Any thoughts on improving coverage? |
@rtlechow welcome back! thanks for making the updates. It looks like the case that wasn't hit is when there's a function in the |
As @aoberoi already approved this PR before, it looks good to me, too. We took a bit long time after this PR was created. Just in case, I'll wait for responses from others until next week before merging this. |
Summary
Allows
SlackBot::{send,reply}
to receive an optional callback. Whilethis is not documented, if a callback is passed to Hubot's
Response::{send,reply}
, Hubot will pass it around.Shamelessly plagiarized from #440 because I'm in need of this
functionality. Fixed the tests to work with
@stubs
.Requirements (place an
x
in each[ ]
)