Skip to content

Commit

Permalink
Only show KO on Slack if relevant
Browse files Browse the repository at this point in the history
In order to improve the visibility on Slack only show the KO keyword
is there is an actual KO on the PR.
Do not show the KO count because one is enough to block the PR.
  • Loading branch information
sgaland committed Aug 21, 2015
1 parent 2f59531 commit c4daaf5
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 c4daaf5

Please sign in to comment.