Giter Site home page Giter Site logo

edith's Introduction

Edith

Usage

Start the Backend

  1. python3.9 -m venv venv
  2. source venv/bin/activate
  3. pip install -r requirements.txt
  4. Open a terminal and run bash ./scripts/slack-bot.sh (prerequisite - docker and docker-compose is required to run postgres)

SlackBot

This Slack bot improves the workflow of development teams. Especially with focus on Jenkins and some other functionalities inluding add user, remove user, modify user, request for leaves, approval leaves etc.

Installation

1st) Create+prepare the Slack App:

Recommended way: Use Manifest file as App template

  1. Create a Slack App
  2. Select "From an app manifest"
  3. Select your Workspace
  4. Paste this Yaml code:
_metadata:
  major_version: 1
  minor_version: 1
display_information:
  name: edith
features:
  app_home:
    messages_tab_enabled: true
    messages_tab_read_only_enabled: false
  bot_user:
    display_name: edith
    always_online: true
oauth_config:
  scopes:
    bot:
      - app_mentions:read
      - channels:read
      - chat:write
      - im:history
      - im:write
      - mpim:history
      - reactions:read
      - reactions:write
      - users:read
      - files:write
      - team:read
settings:
  event_subscriptions:
    bot_events:
      - app_mention
      - message.im
  interactivity:
    is_enabled: true
  org_deploy_enabled: false
  socket_mode_enabled: true
  1. Create the App!
  2. Go to "Basic Information"
  3. -> in "App-Level Tokens", "Generate a Token" with the scope "connections:write"
  4. You will see a App-Level Token (beginning with xapp-). Sse it in the config.yaml as slack.socket_token.
  5. Go to "OAuth & Permissions":
  6. -> "Install to Workspace"
  7. -> you should see a "Bot User OAuth Access Token" (beginning with "xoxb-"). Use it as slack.token in the config.yaml
  8. start the bot!

2nd) Run the bot

Option 1: run via go

  1. install go
  2. create a config.yaml (at least a slack token is required) or take a look in config.sample.yaml
  3. go inside slack bot folder cd slack-bot
  4. Edit slack token and slack auth token in config.yaml file
  5. Run the bot server by bash ./scripts/slack-bot.sh

Usage

Note: You have to invite the bot into the channel to be able to handle commands.

edith's People

Contributors

mkmah avatar shivin01 avatar nicotinas avatar

Watchers

James Cloos avatar  avatar

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.