def revision_is_done(self, branch, revision): """Return a json dictionary with information about whether the job is done and has passed all tests for this revision""" stableDelay = self._get_stable_delay() if branch not in self._branches_cache: return self._failed("Branch %s not found" % branch, 404) job_items = g.buildapi_cache.get_builds_for_revision(branch, revision) if not job_items: return self._failed("Revision %s not found on branch %s" % (revision, branch), 404) return self._ok(get_completeness(job_items, stableDelay))
def revision(self, branch, revision): """Return a list of builds running for this revision""" stableDelay = self._get_stable_delay() if branch not in self._branches_cache: return self._failed("Branch %s not found" % branch, 404) job_items = g.buildapi_cache.get_builds_for_revision(branch, revision) if not job_items: return self._failed("Revision %s not found on branch %s" % (revision, branch), 404) c.job_status = get_completeness(job_items, stableDelay) c.revision = revision return self._ok(job_items)