fixup a couple of runtimes during incident creation

master
Marek Isalski 6 years ago
parent 777b59a29e
commit ab93e34a67

@ -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,
},

Loading…
Cancel
Save