Alvarian / epoch

Slack bot service for scheduling, archiving, and bug tracking | Project type: Site | Presentable: :heavy_check_mark:

Home Page:https://join.slack.com/t/geminga/shared_invite/zt-1o8lokxd3-ZGxac~kDV3D0_f0YZpFXAQ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Introduction

This project is a Node.js application that automates Slack using the Bolt framework. The application allows users to personalize Slack by using commands in Slack chat to perform tasks such as bug tracking, scheduling, and content storage.

Getting Started

We need to first configure your slack api. Visit https://api.slack.com/, login and then create a new app. Navigate to manage apps and then to your newly created app.

alt text

  • SIGNING_SECRET: at the default page, grab the signing secret
  • BOT_ACCESS_TOKEN: navigate to OAUTH & Permissions and grab the Bot User OAuth Token.
  • REDIS_URL: visit upstash and start a free redis instance, grab the main url.
  • PSQL_URL: lastly choose a cloud database that supports postgres instances, and grab the main url. I chose supabase.

Configure this project by setting the following environment variables:

BOT_ACCESS_TOKEN= The Slack bot token
SIGNING_SECRET= Slack signature
PORT= Main application port
REDIS_URL= Redis cloud url
PSQL_URL= Postgres Host Url

Once the environment variables are set, you will need to have Node.js and npm installed on your machine. You can install the dependencies and start the application by running the following commands:

npm install
npm run start

Expose Your Bot

In order for your slack to reach this running app, the local endpoint needs to be forwarded and exposed to the web using ngrok. Follow the intructions until usage and run:

ngrok http 3000

Copy the "Forwarding" url, ex: https://7d0b-173-52-201-90.ngrok.io, to use in the next step.

  1. Go back to you slack api page and navigate to 'Interactivity & Shortcuts' on the side menu: alt text In the request url input field, paste your link with /slack/events added to the end of it, ex: https://7d0b-173-52-201-90.ngrok.io/slack/events. Click save.

  2. Next, navigate to 'Slash Commands' and create a new command. alt text Here put the same link we used for interactivity in the request url field. Give the command a name and description. Click save.

  3. Finally, with the same link, navigate to 'Event Subscriptions': alt text Paste the link in the request url field. Save changes.

Troubleshooting

At the point of running this app, permission errors and missing scope errors will prompt. In your slack api website where we got our bot token at 'OAuth & Permissions' navigate down to the 'Scopes' section of the page and add all missing scopes there. Save changes.

Usage

The application can be used in Slack by sending commands in the chat. The following commands are supported:

  • /track help: List all commands for bug tracking.
  • /track new: Start a new sprint to track a bug.
  • /track sprints: Open list of all sprints.

References

:octocat:

About

Slack bot service for scheduling, archiving, and bug tracking | Project type: Site | Presentable: :heavy_check_mark:

https://join.slack.com/t/geminga/shared_invite/zt-1o8lokxd3-ZGxac~kDV3D0_f0YZpFXAQ


Languages

Language:JavaScript 100.0%Language:Procfile 0.0%