Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/slack bolt #2767

Merged
merged 45 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
2d92e09
Inital work
kevgliss Dec 13, 2022
7a1933a
More bug fixes
kevgliss Dec 13, 2022
85f338d
Adding list participants
kevgliss Dec 13, 2022
7eee62d
Moving error messages
kevgliss Dec 13, 2022
1c20dad
Adds exceptions
kevgliss Dec 13, 2022
34b93ea
Formatting messages
kevgliss Dec 14, 2022
d5cd4c6
Modal submission
kevgliss Dec 16, 2022
25bbda1
More experiments
kevgliss Dec 16, 2022
7471853
Making modal success messages more straight forward
kevgliss Dec 20, 2022
1bd965d
Adding a decorator module
kevgliss Dec 20, 2022
a33e1b3
Allowing unregistered users
kevgliss Dec 20, 2022
75d858d
Resolve KeyError when sending ephemeral message
wssheldon Dec 20, 2022
264d92c
Merge branch 'master' into enhancement/slack-bolt
kevgliss Dec 20, 2022
f30ef0e
Resolves unexpected keyword argument 'code' in BoltResponse
wssheldon Dec 20, 2022
4462616
Resolves async ack never awaited error
wssheldon Dec 20, 2022
2b3b7dd
Enhancement/bolt bookmarks (#2784)
wssheldon Dec 20, 2022
5bf369b
check for existence of body and view in global error handler and ack …
wssheldon Dec 22, 2022
e8990fa
resolves hash conflict in incident report view and resolves UTC event…
wssheldon Dec 22, 2022
9257334
resolves report-tactical command, update view, and pass org slug
wssheldon Dec 22, 2022
ea86e09
implements notification group update command
wssheldon Dec 23, 2022
219cfb0
implement config middleware, functionify refetch_db, and uncomment co…
wssheldon Dec 23, 2022
52ca4e8
update configuring-slack docs to include bookmarks.write scope
wssheldon Dec 23, 2022
968dca6
minor cleanup of unused args, typechecking, and duplicate strings
wssheldon Dec 23, 2022
4dc9c29
resolve workflow exceptions, blockkit bugs, and front-end UI bugs
wssheldon Dec 23, 2022
6ff69a5
Merge branch 'master' into enhancement/slack-bolt
wssheldon Dec 23, 2022
299b95c
enhancement/conversation-bookmarks (#2799)
wssheldon Jan 3, 2023
2724c19
Merge branch 'master' into enhancement/slack-bolt
wssheldon Jan 3, 2023
6eb01bd
removes moved document update code
wssheldon Jan 3, 2023
e52edbb
mvilanova review: address most comments
wssheldon Jan 5, 2023
0d21ad3
mvilanova review: resolve final comments - oncall to lazy func
wssheldon Jan 5, 2023
b1e13d5
Update src/dispatch/plugins/dispatch_slack/incident/interactive.py
wssheldon Jan 5, 2023
eb76e5d
revert oncall success message
wssheldon Jan 5, 2023
1f91b7e
format workflowinstancetab vue file
wssheldon Jan 5, 2023
1a94277
format interactive.py with black to resolve linter issue
wssheldon Jan 5, 2023
d0d26e1
HTTPStatus value from http module and fix typo in engage oncall docst…
wssheldon Jan 5, 2023
2db6247
only build modal if there's a body in error handler
wssheldon Jan 6, 2023
b166152
add type checking to bolt code and fix participant counter func
wssheldon Jan 9, 2023
25743c4
type check workflow code
wssheldon Jan 9, 2023
e6af588
Merge remote-tracking branch 'origin/master' into enhancement/slack-bolt
mvilanova Jan 9, 2023
283d471
Adds missing db commit and fixes docstring
mvilanova Jan 9, 2023
77cad1a
Adds missing filter for channel join and leave subtype messages
mvilanova Jan 9, 2023
5cf4b0c
add args back to handle_message_events func
wssheldon Jan 9, 2023
ed98ba6
reimplement member_joined_channel and other minor fixes
wssheldon Jan 10, 2023
697f783
initial work to make error handling a better ux
wssheldon Jan 10, 2023
7d6f4ac
Merge branch 'master' into enhancement/slack-bolt
kevgliss Jan 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions src/dispatch/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,11 +721,17 @@ def run_slack_websocket(organization: str, project: str):
"""Runs the slack websocket process."""
import asyncio
from sqlalchemy import true
from dispatch.project.models import ProjectRead
from dispatch.project import service as project_service
from dispatch.plugins.dispatch_slack import socket_mode
from dispatch.plugins.dispatch_slack.decorators import get_organization_scope_from_slug

from slack_bolt.adapter.socket_mode.async_handler import AsyncSocketModeHandler

from dispatch.common.utils.cli import install_plugins
from dispatch.plugins.dispatch_slack import feedback # noqa
mvilanova marked this conversation as resolved.
Show resolved Hide resolved
from dispatch.plugins.dispatch_slack.bolt import app
from dispatch.plugins.dispatch_slack.incident.interactive import configure as incident_configure
from dispatch.plugins.dispatch_slack.service import get_organization_scope_from_slug
from dispatch.plugins.dispatch_slack.workflow import configure as workflow_configure
from dispatch.project import service as project_service
from dispatch.project.models import ProjectRead

install_plugins()

Expand Down Expand Up @@ -756,8 +762,20 @@ def run_slack_websocket(organization: str, project: str):
return

session.close()

click.secho("Slack websocket process started...", fg="blue")
asyncio.run(socket_mode.run_websocket_process(instance.configuration))
incident_configure(instance.configuration)
workflow_configure(instance.configuration)

app._token = instance.configuration.api_bot_token.get_secret_value()

async def main():
handler = AsyncSocketModeHandler(
app, instance.configuration.socket_mode_app_token.get_secret_value()
)
await handler.start_async()

asyncio.run(main())


@dispatch_server.command("shell")
Expand Down
Loading