Skip to content

Commit

Permalink
Merge pull request #46 from sgaland/cleaner_slack_post
Browse files Browse the repository at this point in the history
Only show KO on Slack if relevant
  • Loading branch information
CedricCabessa committed Aug 21, 2015
2 parents 2f59531 + c4daaf5 commit 5267193
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bot/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ def slack(url, org, weburl, repos, slackurl, channel):
txt += " *%s* -" % (pr.milestone)
for label in pr.labels:
txt += " *%s* -" % (label['name'])
txt += " %s review:%d %s:%d %s:%d %s:%d\n" % \
txt += " %s review:%d %s:%d %s:%d" % \
(pr.user, pr.nbreview,
settings.FEEDBACK_OK['keyword'], pr.feedback_ok,
settings.FEEDBACK_WEAK['keyword'], pr.feedback_weak,
settings.FEEDBACK_KO['keyword'], pr.feedback_ko)
settings.FEEDBACK_WEAK['keyword'], pr.feedback_weak)
if pr.feedback_ko > 0:
txt += " %s" % (settings.FEEDBACK_KO['keyword'])
txt += "\n"



payload = {"channel": channel,
Expand Down

0 comments on commit 5267193

Please sign in to comment.