Created
January 13, 2013 04:26
-
-
Save erincandescent/4522321 to your computer and use it in GitHub Desktop.
Notifico JIRA hook change proposal: don't display field updates when the value > 40 characters to prevent message truncation or channel flooding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add: | |
def change_summary(field, value): | |
if len(value) < 40: | |
return '{0} set to "{1}"'.format(field, value) | |
else: | |
return '{0} updated'.format(field) | |
At notifico/services/hooks/jira.py line 178, change to: | |
if simplified['changes']: | |
changes = simplified['changes'] | |
line.append(' -'.join([change_summary(k, v) for k, v in changes.items()])) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment