| 16 | } |
| 17 | |
| 18 | function makeMetadata(number: number, baseBranch = "main"): PRMetadata { |
| 19 | return { |
| 20 | platform: "github", |
| 21 | host: "github.com", |
| 22 | owner: "acme", |
| 23 | repo: "widgets", |
| 24 | number, |
| 25 | title: `PR #${number}`, |
| 26 | author: "alice", |
| 27 | baseBranch, |
| 28 | headBranch: `feature/pr-${number}`, |
| 29 | baseSha: "abc123def456abc123def456abc123def456abc1", |
| 30 | headSha: "def456abc123def456abc123def456abc123def4", |
| 31 | url: `https://github.com/acme/widgets/pull/${number}`, |
| 32 | }; |
| 33 | } |
| 34 | |
| 35 | describe("worktree-pool", () => { |
| 36 | test("resolve returns undefined for unknown PR", () => { |