diff options
| author | 2019-02-07 22:59:50 +0000 | |
|---|---|---|
| committer | 2019-02-07 22:59:50 +0000 | |
| commit | a1496e54156174dc1ec28f29ea3890c6ecb4be4e (patch) | |
| tree | be0ce181175af5c158142b06ac50dcdd6b31823a /modules | |
| parent | Return "0s" from utils.to_pretty_time when given 0 seconds (diff) | |
| signature | ||
Check that a `check_run` actually started before it finished (github)
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/github/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/github/__init__.py b/modules/github/__init__.py index a7f0f1ca..7dcdef90 100644 --- a/modules/github/__init__.py +++ b/modules/github/__init__.py @@ -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 = "" |
