-
Notifications
You must be signed in to change notification settings - Fork 61
Conversation
❌ Deploy Preview for ubiquibot-staging failed.
|
This uses a helper to boil down the comments to a list of users and if to enable or not, after when generating incentives it only generates for the users in the list if there are any |
also if it is enabled |
hmm |
i dont get wheres the error its so lucrative |
please make it as draft if its not ready for review, @me505 |
idk how ubiquibot-config-default.ts got changed |
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.
You're using a different prettier setting because of these extra commas, can you fix this?
for (const incentiveComment of incentiveComments) { | ||
const parts = incentiveComment.body.split(" "); | ||
parts.shift(); | ||
if (parts.pop() == "true") { |
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.
this relies on command order. just use a for loop and check for true
, false
, or starts with @
(there shouldn't more than one true
or false
). you can look at this example
} | ||
const parts = body.split(" "); | ||
parts.shift(); | ||
if (parts.pop() !== "true" && parts.pop() !== "false") { |
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.
you can create a helper function that parses the command so you can use it here and in getIncentivizedUsers
to avoid repeating code
gonna have to remake 💀 |
Resolves #780
Quality Assurance: