Run a gh CLI command and return the output.
(args: list[str])
| 38 | |
| 39 | |
| 40 | def _run_gh_command(args: list[str]) -> str: |
| 41 | """Run a gh CLI command and return the output.""" |
| 42 | result = subprocess.run( |
| 43 | ["gh", *args], |
| 44 | capture_output=True, |
| 45 | text=True, |
| 46 | check=False, |
| 47 | ) |
| 48 | if result.returncode != 0: |
| 49 | print(f"Error running gh command: {' '.join(args)}", file=sys.stderr) |
| 50 | print(f"stderr: {result.stderr}", file=sys.stderr) |
| 51 | sys.exit(1) |
| 52 | return result.stdout |
| 53 | |
| 54 | |
| 55 | def _fetch_successful_workflow_runs( |
no test coverage detected
searching dependent graphs…