Check that a check_run actually started before it finished (github)

This commit is contained in:
jesopo 2019-02-07 22:59:50 +00:00
parent d86a0fc55c
commit a1496e5415

View file

@ -554,8 +554,9 @@ class Module(ModuleManager.BaseModule):
if data["check_run"]["completed_at"]:
started_at = self._iso8601(data["check_run"]["started_at"])
completed_at = self._iso8601(data["check_run"]["completed_at"])
seconds = (completed_at-started_at).total_seconds()
duration = " in %s" % utils.to_pretty_time(seconds)
if completed_at > started_at:
seconds = (completed_at-started_at).total_seconds()
duration = " in %s" % utils.to_pretty_time(seconds)
status = data["check_run"]["status"]
status_str = ""