(args: list[str])
| 34 | |
| 35 | |
| 36 | def _gh(args: list[str]) -> str | None: |
| 37 | try: |
| 38 | result = subprocess.run( |
| 39 | ['gh'] + args, |
| 40 | capture_output=True, text=True, timeout=30 |
| 41 | ) |
| 42 | if result.returncode == 0: |
| 43 | return result.stdout.strip() |
| 44 | except (FileNotFoundError, subprocess.TimeoutExpired) as e: |
| 45 | print(f"[rk_github] gh error: {e}") |
| 46 | return None |
| 47 | |
| 48 | |
| 49 | # ---- PR lifecycle ---- |
no test coverage detected