mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 05:15:45 +07:00
[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'.
This commit is contained in:
parent
d7c7e547d4
commit
eb7f5de218
@ -741,13 +741,13 @@ class runbot_build(models.Model):
|
|||||||
state = 'pending'
|
state = 'pending'
|
||||||
elif build.state in ('running', 'done'):
|
elif build.state in ('running', 'done'):
|
||||||
state = 'error'
|
state = 'error'
|
||||||
if build.result == 'ok':
|
|
||||||
state = 'success'
|
|
||||||
if build.result == 'ko':
|
|
||||||
state = 'failure'
|
|
||||||
desc += " (runtime %ss)" % (build.job_time,)
|
desc += " (runtime %ss)" % (build.job_time,)
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
|
if build.result == 'ok':
|
||||||
|
state = 'success'
|
||||||
|
if build.result == 'ko':
|
||||||
|
state = 'failure'
|
||||||
status = {
|
status = {
|
||||||
"state": state,
|
"state": state,
|
||||||
"target_url": "http://%s/runbot/build/%s" % (runbot_domain, build.id),
|
"target_url": "http://%s/runbot/build/%s" % (runbot_domain, build.id),
|
||||||
|
Loading…
Reference in New Issue
Block a user