Skip to content

ykhr53/new-bmo

Repository files navigation

Prerequisites

GitHub personal access token

You need repo and admin:repo_hook permissions.

Chatbot for Slack notification

We use Slack notification with AWS Chatbot for monitoring Pipeline events. You need to create a Chatbot slack client in advance to enable slack notification.

Secrets Manager

You need to store your App's slack token and user name in a Secrets Manager secret named 'SlackTokenForBMO'.

SLACK_TOKEN: <App's slack token> (something begins with xoxb- or xoxp-)
APP_UNAME: <App's user name> (something like U01234ABCDE)
GITHUB_TOKEN: <GitHub access token>
SLACK_WS_ID: <Slack WorkSpace ID for notification>
SLACK_CHANNEL_ID: <Slack Channel ID for notification>

Deploy target region (Optional)

Please specify deploy target regions in src/lib/configuration.ts. By default, BMO deploys a pipeline to Prod stage's region.

Features

vote

Increment/Decrement somebody's score with a comment.

How to use

(syntax)
<name>++|-- <comment>

(example)
bmo++ thanks for your help!
finn++ jake++ nice!
iceking-- 🤷‍♂️

add

Register some name and his/her/its description. (In short, adding item to Dictionary)

How to use

(syntax)
!add <name> <comment>

(example)
!add bmo Finn and Jake's living video game console system

word

Get description by name. (In short, getting item from Dictionary)

How to use

(syntax)
!word <name>

(example)
!word bmo

words

Retrieve all registered words.

How to use

(syntax)
!words

(example)
!words

search

Search word from word list.

How to use

(syntax)
!search <word>

(example)
!search bmo

How to develop

Each command was implemented as a module extends Behavior interface in src/lambda/modules/behaviors/. Behavior has following items.

  • type: unique key of the command
  • triggerPattern: regex as triggers the command when it matches a message in slack
  • reaction: function executed when the command triggered

You can create new commands by adding modules to src/lambda/modules/behaviors/ and exporting them from src/lambda/modules/behaviors/index.ts.

About

This is the brand-new BMO!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published