Giter VIP home page Giter VIP logo

rota-slackbot's Issues

[enhancement] Support timy

Make sure there is support for timy in Rota (replacing Gator)

  • Install app
  • Test scheduled messages
  • If necessary, add coding support for scheduled messages with timy
  • Update documentation accordingly

deployment to heroku

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

  1. were others successful with deploying to heroku fully?
  2. do we have instructions or even notes somewhere that i could refer to?

Cheers,

/cc @mramadan88

[feature] Store rotation

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

[feature] Add description

Add description to the “create” command (need reformatting of list data structure to support). Show description in list and an “info” command.

[qa] Test all commands with MongoDB

  • new (with description)
  • new (without description)
  • new (already exists)
  • description
  • description (empty)
  • description (doesn't exist)
  • delete
  • delete (doesn't exist)
  • about (without staff)
  • about (with staff)
  • about (doesn't exist)
  • staff
  • staff (extra spaces and commas)
  • staff (doesn't exist)
  • reset staff
  • reset staff (doesn't exist)
  • assign user
  • assign user with handoff message
  • assign user (doesn't exist)
  • assign next
  • assign next with handoff message
  • assign next (no staff saved)
  • assign next (current assignee not in list)
  • assign next (doesn't exist)
  • who
  • who (doesn't exist)
  • unassign
  • unassign (doesn't exist)
  • list
  • message
  • message (nobody assigned)
  • message (doesn't exist)
  • help

Support for NodeJS16

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?

[bug] Create without description sent as a message

If create command is used without a description, then it's sent as a message. This results in the following behavior:

  • If rotation exists and has assigned user, a message is sent to the on-call user
  • If rotation doesn't exist, a message error is produced saying the rotation doesn't exist so the message couldn't be delivered
  • If rotation exists and has no assigned user, a message error is produced saying nobody is assigned so the message can't be delivered and prompts to assign someone

Desired behavior: Allow empty descriptions

New rotation fails with TypeError: cleanText.matchAll

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?

[enhancement][qa] Make rota more robust to sluggish Slack API

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.

Using the stated Rotation Reminder example in the readme throws error

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

Screenshot 2020-11-12 at 18 03 58

I have a liveops rotation config'd:

Screenshot 2020-11-12 at 18 16 27

To which rota-bot complains:

Screenshot 2020-11-12 at 18 07 23

Please could you update your docs to reflect how this should be configured?

[bug][fixed][qa] workflow is not a bot user

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.

Why @mention and not /action

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

[enhancement] Change create to new

Change creation command to @rota new "[rotation]" description

Improves human readability / logic and reduces chance of error or mistaken commands

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.