lib/jobs.js
function status(job) {
  if (job.errored) return 'errored';
  if (!job.started) return 'submitted';
  if (!job.finished) return 'running';
  if (job.test_exitcode !== 0) return 'failed';
  if (job.type !== TEST_ONLY && job.deploy_exitcode !== 0) return 'failed';
  return 'passed';
}
function status(job) {
  if (job.errored) return 'errored';
  if (!job.started) return 'submitted';
  if (!job.finished) return 'running';
  if (job.test_exitcode !== 0) return 'failed';
  if (job.type !== TEST_ONLY && job.deploy_exitcode !== 0) return 'failed';
  return 'passed';
}
failed, passed, errored, running, submitted