(args: list[str])
| 32 | |
| 33 | |
| 34 | def run_gh(args: list[str]) -> str: |
| 35 | result = subprocess.run( |
| 36 | ["gh", *args], |
| 37 | capture_output=True, |
| 38 | text=True, |
| 39 | check=False, |
| 40 | encoding="utf-8", |
| 41 | errors="replace", |
| 42 | ) |
| 43 | if result.returncode != 0: |
| 44 | print(f"FAIL: gh {' '.join(args)}: {result.stderr}", file=sys.stderr) |
| 45 | sys.exit(1) |
| 46 | return result.stdout or "" |
| 47 | |
| 48 | |
| 49 | def graphql(query: str, **variables: Any) -> dict[str, Any]: |
no test coverage detected