Skip to content

Commit

Permalink
Release v1.9.0 - Syntax cleanup, several options no longer required. (#…
Browse files Browse the repository at this point in the history
…426)

* Release v1.9.0 - Syntax cleanup, several options no longer required.

* Deprecate hpa and pdb for kustomize manifest.
  • Loading branch information
echoboomer committed Jan 15, 2024
1 parent d3311f5 commit 8d1e4bf
Show file tree
Hide file tree
Showing 18 changed files with 291 additions and 345 deletions.
19 changes: 9 additions & 10 deletions backend/bot/slack/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,22 +600,21 @@ def handle_dismiss_message(ack, body):
logger.error(f"Error deleting message: {error}")


@app.action("incident.incident_postmortem_link")
@app.action("incident.clicked_conference_link")
def handle_static_action(ack, body, logger):
logger.debug(body)
ack()


@app.action("incident.click_conference_bridge_link")
def handle_static_action(ack, body, logger):
logger.debug(body)
ack()

if config.active.links:
for l in config.active.links:

@app.action("incident.incident_guide_link")
def handle_static_action(ack, body, logger):
logger.debug(body)
ack()
@app.action(
f"incident.clicked_link_{l.get('title').lower().replace(' ', '_')}"
)
def handle_static_action(ack, body, logger):
logger.debug(body)
ack()


@app.action("incident.join_incident_channel")
Expand Down
77 changes: 40 additions & 37 deletions backend/bot/slack/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,47 +285,50 @@ def sp_incident_list_message(

return base_block

def new_jira_message(key: str, summary: str, type: str, link: str) -> List[Dict]:

def new_jira_message(
key: str, summary: str, type: str, link: str
) -> List[Dict]:
return [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "A Jira issue has been created for this incident.",
},
},
{"type": "divider"},
{
"type": "section",
"fields": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "A Jira issue has been created for this incident.",
},
"type": "mrkdwn",
"text": "*Key:* {}".format(key),
},
{"type": "divider"},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Key:* {}".format(key),
},
{
"type": "mrkdwn",
"text": "*Summary:* {}".format(summary),
},
{
"type": "mrkdwn",
"text": "*Type:* {}".format(type),
},
],
"type": "mrkdwn",
"text": "*Summary:* {}".format(summary),
},
{
"type": "actions",
"block_id": "jira_view_issue",
"elements": [
{
"type": "button",
"action_id": "jira.view_issue",
"style": "primary",
"text": {
"type": "plain_text",
"text": "View Issue",
},
"url": link,
},
],
"type": "mrkdwn",
"text": "*Type:* {}".format(type),
},
]
],
},
{
"type": "actions",
"block_id": "jira_view_issue",
"elements": [
{
"type": "button",
"action_id": "jira.view_issue",
"style": "primary",
"text": {
"type": "plain_text",
"text": "View Issue",
},
"url": link,
},
],
},
]
37 changes: 15 additions & 22 deletions backend/bot/templates/incident/channel_boilerplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,28 +179,21 @@ def create(incident_channel_details: Dict[str, Any], severity: str):
"style": "primary",
},
)
button_el.extend(
[
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Incident Guide",
},
"url": config.active.links.get("incident_guide"),
"action_id": "incident.incident_guide_link",
},
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Incident Postmortems",
},
"url": config.active.links.get("incident_postmortems"),
"action_id": "incident.incident_postmortem_link",
},
]
)
if config.active.links:
for l in config.active.links:
button_el.extend(
[
{
"type": "button",
"text": {
"type": "plain_text",
"text": l.get("title"),
},
"url": l.get("url"),
"action_id": f"incident.clicked_link_{l.get('title').lower().replace(' ', '_')}",
},
]
)
blocks.extend(
[
{
Expand Down
Loading

0 comments on commit 8d1e4bf

Please sign in to comment.