Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion src/dispatch/plugins/dispatch_slack/case/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ def create_case_message(case: Case, channel_id: str) -> list[Block]:
if variant := case.signal_instances[0].signal.variant:
fields.append(f"*Variant* \n {variant}")

case_description = (
case.description if len(case.description) <= 2500 else f"{case.description[:2500]}..."
)

blocks = [
Section(
text=title,
Expand All @@ -96,7 +100,7 @@ def create_case_message(case: Case, channel_id: str) -> list[Block]:
url=f"{DISPATCH_UI_URL}/{case.project.organization.slug}/cases/{case.name}",
),
),
Section(text=f"*Description* \n {case.description}"),
Section(text=f"*Description* \n {case_description}"),
Section(fields=fields),
Section(text="*Actions*"),
]
Expand Down
8 changes: 7 additions & 1 deletion src/dispatch/plugins/dispatch_slack/incident/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -2447,12 +2447,18 @@ def handle_report_incident_submission_event(
# Create the incident
incident = incident_service.create(db_session=db_session, incident_in=incident_in)

incident_description = (
incident.description
if len(incident.description) <= 2500
else f"{incident.description[:2500]}..."
)

blocks = [
Section(
text="This is a confirmation that you have reported an incident with the following information. You will be invited to an incident Slack conversation shortly."
),
Section(text=f"*Title*\n {incident.title}"),
Section(text=f"*Description*\n {incident.description}"),
Section(text=f"*Description*\n {incident_description}"),
Section(
fields=[
MarkdownText(
Expand Down