Skip to content
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 killjoy message to the response when > MAX_POINTS #8

Closed
wants to merge 1 commit into from

Conversation

diachini
Copy link

@diachini diachini commented Feb 9, 2019

Just like Buzzkill Mode TM from the Hipchat karma bot, this prints out
a message explaining the 5 (or MAX_POINTS) limit if someone is giving
(or taking away) more karma.

closes #4 the rest of the way

Just like `Buzzkill Mode TM` from the Hipchat karma bot, this prints out
a message explaining the 5 (or MAX_POINTS) limit if someone is giving
(or taking away) more karma.

closes jetpackworkflow#4 the rest of the way
@@ -43,6 +43,7 @@ module.exports = (robot) ->
reasonsKeyword = process.env.HUBOT_PLUSPLUS_REASONS or 'raisins'
maxPoints = process.env.HUBOT_PLUSPLUS_MAX_POINTS or 5
reasonConjunctions = process.env.HUBOT_PLUSPLUS_CONJUNCTIONS or 'for|because|cause|cuz|as'
killjoyMessage = process.env.HUBOT_PLUSPLUS_KILLJOY_MESSAGE or 'Killjoy Mode™ has enforced a maximum change of ' + maxPoints + ' points'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know the for Buzzkill Mode™ is probably not an enforceable trademark.. but just to be safe, I went with Killjoy Mod™ instead 🤷‍♂️

@regentgal lemme know whatcha think!

@@ -18,6 +18,7 @@ API
* `'taco tuesday'++` - add a point to 'taco tuesday'
* `++` - add a point to the most previously voted-on thing
* `thing++ for stuff` - keep track of why you gave thing points
* `thing+++++++` - adding more than `HUBOT_PLUSPLUS_MAX_POINTS` points will be capped at the max and a `HUBOT_PLUSPLUS_KILLJOY_MESSAGE` will be appended to the updated score.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this will be self explanatory when it happens and no one besides us will understand that those constants are. delete this line, and I'll approve.

@regentgal
Copy link

testing works

jetbot> danny++++++++
jetbot> danny has 5 points (Killjoy Mode™ has enforced a maximum change of 5 points).

@regentgal
Copy link

As soon as documentation changes are made, I'll merge.

@regentgal
Copy link

#13 introduces a changelog. please work with @Zajn so you can also had an entry for this as well.

@diachini
Copy link
Author

I've come to enjoy not being yelled at by jetbot when you try to give more than 5 karma at a time. I'm gonna close this since I don't foresee myself getting this across the finish line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow users to give/remove more than one point at a time, upto a configurable limit
2 participants