MCPcopy Create free account
hub / github.com/FastLED/FastLED / get_failed_jobs

Method get_failed_jobs

ci/tools/gh_debug.py:135–164  ·  view source on GitHub ↗

Get list of failed jobs.

(self)

Source from the content-addressed store, hash-verified

133 return {}
134
135 def get_failed_jobs(self) -> list[dict[str, str]]:
136 """Get list of failed jobs."""
137 try:
138 result = subprocess.run(
139 ["gh", "run", "view", self.run_id, "--json", "jobs"],
140 capture_output=True,
141 text=True,
142 check=True,
143 timeout=10,
144 )
145 data = json.loads(result.stdout)
146 jobs = data.get("jobs", [])
147
148 # Return only failed jobs
149 failed_jobs = [
150 {
151 "name": job.get("name", "Unknown"),
152 "id": str(job.get("databaseId", "")),
153 "conclusion": job.get("conclusion", ""),
154 }
155 for job in jobs
156 if job.get("conclusion") in ["failure", "cancelled"]
157 ]
158 return failed_jobs
159 except KeyboardInterrupt as ki:
160 handle_keyboard_interrupt(ki)
161 raise
162 except Exception as e:
163 print(f"Error getting failed jobs: {e}", file=sys.stderr)
164 return []
165
166 def try_download_build_summary(self) -> Optional[Path]:
167 """Try to download build-summary artifacts for faster analysis.

Callers 1

debugMethod · 0.95

Calls 4

printFunction · 0.50
runMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected