Yokoso Save

🚪 Slack integration for https://srd-gate.com/03/login.cgi

Project README

Yokoso

Tests

全体像

セットアップ

サーバサイド

前提

  • 以下を使っています
    • Heroku
    • Redis
  • 以下の環境変数は後で設定するので空で大丈夫です
    • SLACK_TOKEN
    • MAIL_ADDRESS_WEBHOOK

起動

サーバ実行の場合

Deploy

  • 環境変数を設定してデプロイする
  • リソース割り当て

ローカル実行の場合

  • sample.env -> .env に名前変更して、環境変数を設定する
  • localhost:5000 で起動するのでグローバルからローカルに通信をフォワーディングする
heroku local -e .env

Slack App 作成

Interactive Components

  • 設定をオンにしてサーバのアドレスを入力する
  • https://{{server_url}}/app/interactive

Slash Commands

  • スラッシュコマンドの設定を追加する
  • https://{{server_url}}/app/dialog

OAuth & Permissions

  • 権限を追加する
    • channels:history
    • chat:write:bot
    • users:read
    • commands
      • スラッシュコマンドを設定していれば自動で追加されているはず
  • Token は後でサーバサイド環境変数へセットする

App Install

  • ワークスペースへのインストールを忘れずに実施

Email Webhook

  • メール受信 -> Webhook を作成
  • 受信したメール本文を json 形式の body 要素として post すれば OK
  • webhook アドレスは https://{{server_url}}/app/notification
  • サービスは何でも良い
  • Webhook 用メールアドレスは後でサーバサイド環境変数へセットする

サーバーサイド環境変数の再設定

  • 以下の環境変数を設定する
    • SLACK_TOKEN
    • MAIL_ADDRESS_WEBHOOK

Code of Conduct

Everyone interacting in the yokoso project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

License

The gem is available as open source under the terms of the Apache License 2.0.

Open Source Agenda is not affiliated with "Yokoso" Project. README Source: kufu/yokoso
Stars
76
Open Issues
2
Last Commit
2 weeks ago
Repository
License

Open Source Agenda Badge

Open Source Agenda Rating