Skip to content

Commit

Permalink
comment about slack wording/placement
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyorlando committed Dec 19, 2024
1 parent 9fd7d2e commit d928b6d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
12 changes: 7 additions & 5 deletions engine/apps/slack/scenarios/paging.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,24 +840,26 @@ def _get_team_select_blocks(

blocks.extend(
[
team_severity_checkboxes_element,
typing.cast(
Block.Context,
{
# NOTE: we add this here instead of as a checkbox option description because those can only
# be defined as plain text (ie. not markdown where links are supported)
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": (
"Check the following box if you would like to escalate to this team as an 'important' "
"escalation. This will set a `payload.oncall.important` attribute in the alert to `true`. "
"Teams can configure their Direct Paging Integration to route to different escalation chains "
"based on this. <https://grafana.com/docs/oncall/latest/integrations/manual/#important-escalations|Learn more>"
"Check the above box if you would like to escalate to this team as an 'important' "
"escalation. Teams can configure their Direct Paging Integration to route to different "
"escalation chains based on this. "
"<https://grafana.com/docs/oncall/latest/integrations/manual/#important-escalations|Learn more>"
),
},
],
},
),
team_severity_checkboxes_element,
]
)

Expand Down
10 changes: 5 additions & 5 deletions engine/apps/slack/tests/scenario_steps/test_paging.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def _setup_direct_paging_integration(team):
)

assert len(blocks) == 4
input_block, context_block, team_severity_context_block, team_severity_checkboxes = blocks
input_block, context_block, team_severity_checkboxes, team_severity_context_block = blocks

team_severity_important_checkbox_option = {
"text": {
Expand All @@ -566,10 +566,10 @@ def _sort_team_options(options):
)

assert team_severity_context_block["elements"][0]["text"] == (
"Check the following box if you would like to escalate to this team as an 'important' "
"escalation. This will set a `payload.oncall.important` attribute in the alert to `true`. "
"Teams can configure their Direct Paging Integration to route to different escalation chains "
"based on this. <https://grafana.com/docs/oncall/latest/integrations/manual/#important-escalations|Learn more>"
"Check the above box if you would like to escalate to this team as an 'important' "
"escalation. Teams can configure their Direct Paging Integration to route to different "
"escalation chains based on this. "
"<https://grafana.com/docs/oncall/latest/integrations/manual/#important-escalations|Learn more>"
)
assert team_severity_checkboxes["accessory"]["type"] == "checkboxes"
assert team_severity_checkboxes["accessory"]["options"] == [team_severity_important_checkbox_option]
Expand Down

0 comments on commit d928b6d

Please sign in to comment.