From ab93e34a67f7fdc2f1091feea7fa9a8df36e8009 Mon Sep 17 00:00:00 2001 From: Marek Isalski Date: Tue, 19 Jun 2018 01:44:14 +0200 Subject: [PATCH] fixup a couple of runtimes during incident creation --- fih.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fih.py b/fih.py index bbee008..e76b387 100644 --- a/fih.py +++ b/fih.py @@ -259,7 +259,7 @@ def mattermost_incident_command( command, args, channel_id, raw_incident_number, return "" def mattermost_incident_start( description, team_id, user_name, user_id, channel_id ): - raw_incident_number = incident.generate_raw_incident_number() + raw_incident_number = generate_raw_incident_number() fi_number = raw_incident_number_to_public_incident_number( raw_incident_number ) channel_name = raw_incident_number_to_channel_name( raw_incident_number ) @@ -275,7 +275,7 @@ def mattermost_incident_start( description, team_id, user_name, user_id, channel app.mm.client.make_request( 'post', '/channels/' + channel[ 'id' ] + '/members', options = { 'user_id': user_id, } ) app.mm.posts.create_post( options = { 'channel_id': channel[ 'id' ], - 'message': "Incident discussion channel for [%s](%s) created by @%s." % ( fi_number, raw_incident_number_to_url( incident_number ), user_name ), + 'message': "Incident discussion channel for [%s](%s) created by @%s." % ( fi_number, raw_incident_number_to_url( raw_incident_number ), user_name ), } ) now = datetime.datetime.utcnow().strftime( "%Y-%m-%d %H:%M" ) @@ -313,7 +313,7 @@ Again, don't forget to **/incident PUBLISH** once making changes. Again, after setting the headline status you must: **/incident PUBLISH** -## Good luck, Incident Commander @%(commander_name)s!""" % { "incident_url": raw_incident_number_to_url( incident_number ), +## Good luck, Incident Commander @%(commander_name)s!""" % { "incident_url": raw_incident_number_to_url( raw_incident_number ), "commander_name": user_name, "now": now, },