Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Commit

Permalink
Put diff build result icon on the same line as the message
Browse files Browse the repository at this point in the history
Summary: Having them on separate lines makes them take up a lot of vertical space

Test Plan: none

Reviewers: wwu, zev

Reviewed By: wwu

Subscribers: wwu, josiah, vishal, changesbot

Differential Revision: https://tails.corp.dropbox.com/D94064
  • Loading branch information
aroravishal committed Mar 7, 2015
1 parent 15084a0 commit 81adbd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions changes/listeners/phabricator_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ def build_finished_handler(build_id, **kwargs):

result_image = ''
if build.result == Result.passed:
result_image = 'green-check'
result_image = '{icon check, color=green}'
elif build.result == Result.failed:
result_image = 'red-x'
result_image = '{icon times, color=red}'
else:
result_image = 'yellow-question'
result_image = '{icon question, color=orange}'

message = u'{image}\nBuild {result} - {project} #{number} ({target}). Build Results: [link]({link})'.format(
message = u'Build {result} {image} - [{project} #{number}]({link}) ({target}).'.format(
image=result_image,
number='{0}'.format(build.number),
result=unicode(build.result),
Expand Down
2 changes: 1 addition & 1 deletion tests/changes/listeners/test_phabricator.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_whitelisted_project(self, get_options, phab):
get_options.assert_called_once_with(project.id)
build_link = build_uri('/projects/{0}/builds/{1}/'.format(
build.project.slug, build.id.hex))
expected_msg = "red-x\nBuild Failed - test #1 (D1). Build Results: [link]({0})".format(
expected_msg = "Build Failed {{icon times, color=red}} - [test #1]({0}) (D1).".format(
build_link)

phab.assert_called_once_with('1', expected_msg)

0 comments on commit 81adbd7

Please sign in to comment.