From eb7f5de218ff73fd1860de93be8bb224f5366dce Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Thu, 24 Jan 2019 11:16:51 +0100 Subject: [PATCH] [FIX] runbot: update github status with correct state Since d7c7e54 the github status is send in job_29. At this moment, the state of the build is still 'testing'. For that reason, the github status is set to 'pending'. With this commit, once a result is available, the github status is updated with the right value even if the build state is 'testing'. --- runbot/models/build.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runbot/models/build.py b/runbot/models/build.py index 576b955b..e80ff12c 100644 --- a/runbot/models/build.py +++ b/runbot/models/build.py @@ -741,13 +741,13 @@ class runbot_build(models.Model): state = 'pending' elif build.state in ('running', 'done'): state = 'error' - if build.result == 'ok': - state = 'success' - if build.result == 'ko': - state = 'failure' desc += " (runtime %ss)" % (build.job_time,) else: continue + if build.result == 'ok': + state = 'success' + if build.result == 'ko': + state = 'failure' status = { "state": state, "target_url": "http://%s/runbot/build/%s" % (runbot_domain, build.id),