diff --git a/fih.py b/fih.py index eecdfe3..80e857d 100644 --- a/fih.py +++ b/fih.py @@ -88,8 +88,11 @@ def mattermost_incident_command( command, args, channel_id, raw_incident_number, ev.set_year( datetime.datetime.utcnow().strftime( "%Y" ) ) written = ev.write() + short_written = written + if len( short_written ) > 512: + short_written = short_written[ :509 ] + "..." app.mm.posts.create_post( options = { 'channel_id': private_channel_id, - 'message': "#### Written `%s`:\n\n```\n%s```" % ( ev.path_short(), written ), + 'message': "#### Written `%s`:\n\n```\n%s```" % ( ev.path_short(), short_written ), } ) cmdline = app.config[ "MERCURIAL_BIN" ] + " add " + ev.path_short()