Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Installing Slack app across multiple workspaces #88

Closed
17 of 18 tasks
alysivji opened this issue Mar 11, 2019 · 0 comments · Fixed by #187
Closed
17 of 18 tasks

Installing Slack app across multiple workspaces #88

alysivji opened this issue Mar 11, 2019 · 0 comments · Fixed by #187
Assignees
Labels
effort high enhancement New feature or request epic Large issue that is split up into smaller issues priority high

Comments

@alysivji
Copy link
Member

alysivji commented Mar 11, 2019

Look into how Slack does this so we can add this functionality.

Steps

  • Incorporate OAuth2 flow to allow other Slack workspaces to install the integration (Enable installation into other Slack workspaces #174)
    • get OAuth2 flow working locally
    • figure out what information needs to be saved to the DB; plan data model
    • store bot-token securely in the database (SQLAlchemy-Utils has an encrypted method)
      • set up scripts to migrate data if secret_key changes
      • look at how flask-dance does things
  • Go thru apps to figure out what needs to be changed
    • Slack adapter needs to be initialized upon use -- dependency injection
    • How does each app change? How does each data model change?
  • Design a nicer app experience; read Slack docs

App Changes

  • Events Database
    • no changes at the moment, except for point to the right Slack adapter
  • GitHub Summary (Enable workspaces to use the GitHub Summary feature #179)
    • rename Slack adapter instance to be specific for ChiPy
    • migration
      • schema -- add a column for installation_id to connect to slack installation
      • data -- for each user in the GitHub table, add the foreign key for the ChiPy slack; only run this one in production. Test in both for sure, but we do not want this migration run in dev
      • rename table -- User should be GitHubSummaryUser
    • when creating an account, ensure we add the installation foreign key
    • parse team_id from request and pass it into task; all modifications that go along with that
    • create a new Slack adapter to post in the correct workspace
      • for now pass in the workspace_id in the poller json
      • use workspace_id to find bot token
  • GitHub Webhook
    • no changes at the moment, except for point to the right Slack adapter
  • Retweeter
    • no changes at the moment, except for point to the right Slack adapter
  • Upcoming Events
    • no changes at the moment

Things to Think About

  • welcome workflow (room specific)

Reading Material


This epic was too big, so we split into multiple issues. See #186

Notes

  • Have an admin site for workspace admins to configure settings
    • look at other slack apps to figure out what they do
    • upon login
      • not a workspace admin
      • workspace admin, but app is not installed
      • admin, show them panel allowing them to configure settings
  • External integration
    • implement GitHub OAuth flow
  • Events Database
    • no changes at the moment, except for point to the right Slack adapter
    • each slack installation can have multiple meetup groups they can associate with
    • set up jobs for workspace_id to scrap as needed, attach workspace_id to each record, or maybe use a many-to-many as we don't want to fetch the same events over and over again
      • think this thru
  • GitHub Webhook
    • move post_to_slack to workflow.py
  • Retweeter
    • each slack installation can have multiple twitter accounts they want to share
    • start thinking about how we are going to store info; key_value doesn't make much sense; learn from previous migration
@alysivji alysivji added the spike Research ticket label Mar 11, 2019
@alysivji alysivji self-assigned this Mar 11, 2019
@alysivji alysivji changed the title Installing Slack apps across multiple workspaces Installing Slack app across multiple workspaces Mar 11, 2019
@alysivji alysivji added epic Large issue that is split up into smaller issues priority high and removed priority medium labels May 28, 2019
@alysivji alysivji added enhancement New feature or request and removed spike Research ticket labels Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort high enhancement New feature or request epic Large issue that is split up into smaller issues priority high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant