Skip to content

Commit

Permalink
Adding files to fix an issue with creating incidents (#585)
Browse files Browse the repository at this point in the history
* Adding files to fix an issue with creating incidents

* Adding the AWS_SSO_ROLE_ARN to the unit tests so that they dont fail
  • Loading branch information
sylviamclaughlin authored Jul 19, 2024
1 parent c6196eb commit 4c88a74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,5 @@ jobs:
NOTIFY_SRE_USER_NAME: ${{ secrets.NOTIFY_SRE_USER_NAME }}
NOTIFY_SRE_CLIENT_SECRET: ${{ secrets.NOTIFY_SRE_CLIENT_SECRET }}
NOTIFY_OPS_CHANNEL_ID: ${{ secrets.NOTIFY_OPS_CHANNEL_ID }}
SRE_BOT_EMAIL: ${{ secrets.SRE_BOT_EMAIL }}
SRE_BOT_EMAIL: ${{ secrets.SRE_BOT_EMAIL }}
AWS_SSO_ROLE_ARN: ${{ secrets.AWS_SSO_ROLE_ARN }}
2 changes: 1 addition & 1 deletion app/modules/incident/incident.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def submit(ack, view, say, body, client, logger):
)

# Set the description
client.conversations_setDescription(channel=channel_id, description=f"{name}")
client.conversations_setPurpose(channel=channel_id, purpose=f"{name}")

# Announce incident
user_id = body["user"]["id"]
Expand Down
4 changes: 2 additions & 2 deletions app/tests/modules/incident/test_incident.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,8 @@ def test_incident_submit_creates_channel_sets_description(
}
incident.submit(ack, view, say, body, client, logger)
client.conversations_create.assert_called_once_with(name=f"incident-{DATE}-name")
client.conversations_setDescription.assert_called_once_with(
channel="channel_id", description="name"
client.conversations_setPurpose.assert_called_once_with(
channel="channel_id", purpose="name"
)


Expand Down

0 comments on commit 4c88a74

Please sign in to comment.