kmaida / rota-slackbot Goto Github PK
View Code? Open in Web Editor NEWSlackbot that helps manage rotations.
License: MIT License
Slackbot that helps manage rotations.
License: MIT License
Make sure there is support for timy in Rota (replacing Gator)
Hello,
thanks a ton for developing this app. i'm looking to use it to try and rotate a few team chores like standups moderation and so. I'd like to deploy the app to heroku
Cheers,
/cc @mramadan88
Change delete command to @rota delete "[rotation]"
Improves human readability / logic and reduces chance of error or mistaken commands
Store rotation members so that people don't need to know who is next in order to rotate the assignment.
This needs to include a few commands along with validation and error handling:
[rotation] staff <@U...> <@U...> <@U...>
[rotation] assign next
[rotation] reset staff
[FIXED] This was user error.
However, it does open up the question of, should there be proofing in the code against mistakes like this?
Need to remove |username
from any user mentions
Create a way to send the next assigned person a handoff message.
Add description to the “create” command (need reformatting of list data structure to support). Show description in list and an “info” command.
List all the existing rotations
This has thrown off the testing for commands.
Add "about” command that lists assigned user and description
Potentially test image uploads too, but this is not important if it doesn't fully work
Because there are certain requirements around how rota can be used with remind, can remind capabilities be baked into rota as a rota command?
Gator:
Remind:
We are running this app in AWS Lambda with NodeJS12. NodeJS12 will no longer be supported by AWS and we will need to upgrade the runtime to nodejs16 but we are not sure if rota-slackbot would be able to run in this version. Could you please confirm if we can update the code to use nodejs16 and update our runtime to nodejs16?
If create command is used without a description, then it's sent as a message. This results in the following behavior:
Desired behavior: Allow empty descriptions
I've been following README's guide to set up rota
locally with ngrok
.
My rota app is installed. I can easily do things like @rota help
and the bot responds.
But I cannot create a new rotation with something like:
@rota new "test" description
I get an error:
:cry: I'm sorry, I couldn't do that because an error occurred:
TypeError: cleanText.matchAll(...) is not a function or its return value is not iterable
In node.js
output I see the following:
TypeError: cleanText.matchAll(...) is not a function or its return value is not iterable
at Object.parseCmd (/Users/vitaly/git/rota-slackbot/utils/utils.js:108:31)
at module.exports (/Users/vitaly/git/rota-slackbot/app-mentions/new.js:8:30)
at app.event (/Users/vitaly/git/rota-slackbot/app-mentions.js:63:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
This is how a POST /slack/events
request looks like according to ngrok
:
{
"token": "...",
"team_id": "...",
"api_app_id": "...",
"event": {
"client_msg_id": "...",
"type": "app_mention",
"text": "<@U01P006CVDY> new \"test\" desc",
"user": "...",
"ts": "1614064660.015100",
"team": "...",
"blocks": [
{
"type": "rich_text",
"block_id": "zce",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "user",
"user_id": "U01P006CVDY"
},
{
"type": "text",
"text": " new \"test\" desc"
}
]
}
]
}
],
"channel": "...",
"event_ts": "1614064660.015100"
},
"type": "event_callback",
"event_id": "Ev01P6AQKGLC",
"event_time": 1614064660,
"authorizations": [
{
"enterprise_id": null,
"team_id": "...",
"user_id": "...",
"is_bot": true,
"is_enterprise_install": false
}
],
"is_ext_shared_channel": false,
"event_context": "1-app_mention-T1KGQ5533-C1KGA6UTY"
}
My local node.js
is this one:
$ node -v
v10.23.3
I've tried with both smart quotes and normal quotes. It's all the same.
To me "text": "<@U01P006CVDY> new \"test\" desc"
looks just fine, regexp should work. But it doesn't.
What I am doing wrong?
Sometimes when Slack's API is sluggish responding, Rota gets hung up on async calls and doesn't seem to completely process functions before moving on too quickly. Add some functionality to handle race conditions on slow networks or poor connectivity.
As per the below, I set a reminder using this text:
/remind @rota #bot-testing “liveops” assign the next user in the rotation using: @rota "liveops" assign next
at 5:49pm
I have a liveops
rotation config'd:
To which rota-bot complains:
Please could you update your docs to reflect how this should be configured?
Update format of bot messages to use bold instead of quotes and make better use of emphasis.
When a workflow mentions the bot, processing is unable to continue because there is no user available (user ID of sender is undefined). Need to build functionality to handle when message comes from something that is not a bot and has no user ID.
Hello,
Was wondering why rota was implemented as a mention bot @rota and not a slack action /rota
Thought you could explain if there is a usage or technical motivation. 🙂
Thanks,
/CC @mramadan88
Support use of /remind
by recognizing commands even if they have Reminder:
at the beginning of them.
There's definitely a need to be able to update the description for existing rotations.
Need to use a persistent file store so the file on Heroku isn't lost every time the dyno is restarted.
Replacing all instances of |user.name
in event text immediately will enhance and clean up code later, and negate any need for additional command-specific processing.
Change creation command to @rota new "[rotation]" description
Improves human readability / logic and reduces chance of error or mistaken commands
Possibly a race condition?
There is sometimes a delay between the Slackbot making file changes and then executing commands that rely on updated store.
E.g.:
@rota "test" create some description
(success)
@rota "test" about
(no response)
Update README
How does an app carry on a conversation with a user in DM where the bot can detect what the user says and respond?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.