Fix update last green commit
@@ -1968,6 +1968,9 @@ def try_update_last_green_commit():
# Find any failing steps other than Buildifier and "try update last green".
def HasFailed(job):
+ # Some irrelevant job doesn't have "state" field.
+ if "state" not in job:
+ return True
return (
job["state"] != "passed"
and job["id"] != current_job_id
