* Run a `gh` write command in `repoRoot`. Unlike the read adapters in * pull-request.ts (which swallow errors to null), writes surface failures so * the UI can toast them — the user explicitly asked to mutate their PR.
(args: string[], repoRoot: string)
| 15 | * the UI can toast them — the user explicitly asked to mutate their PR. |
| 16 | */ |
| 17 | async function ghWrite(args: string[], repoRoot: string): Promise<void> { |
| 18 | try { |
| 19 | await execFileAsync("gh", args, { cwd: repoRoot, encoding: "utf8" }); |
| 20 | } catch (err: unknown) { |
| 21 | throw new Error(ghErrorMessage(err)); |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | const MERGE_METHOD_FLAG: Record<PullRequestMergeMethod, string> = { |
| 26 | [PULL_REQUEST_MERGE_METHOD.MERGE]: "--merge", |
no test coverage detected