Skip to content

Commit 0ac1fae

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(pi): clarify shared open PR errors
1 parent adc0f52 commit 0ac1fae

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

apps/sim/executor/handlers/pi/cloud-review-backend.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ describe('runCloudReviewPi', () => {
530530
mockExecuteTool.mockResolvedValue({ success: true, output: snapshot({ state: 'closed' }) })
531531

532532
await expect(runCloudReviewPi(baseParams(), { onEvent: vi.fn() })).rejects.toThrow(
533-
/only open PRs can be reviewed/
533+
/only open PRs are supported/
534534
)
535535
expect(mockRun).not.toHaveBeenCalled()
536536
})

apps/sim/executor/handlers/pi/github-pr.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ describe('fetchOpenPrSnapshot', () => {
9999
mockExecuteTool.mockResolvedValue({ success: true, output: snapshot({ state: 'closed' }) })
100100

101101
await expect(fetchOpenPrSnapshot(COORDINATES)).rejects.toThrow(
102-
'PR #7 is closed; only open PRs can be reviewed'
102+
'PR #7 is closed; only open PRs are supported'
103103
)
104104
})
105105
})

apps/sim/executor/handlers/pi/github-pr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export async function fetchOpenPrSnapshot(
122122
): Promise<PullRequestSnapshot> {
123123
const snapshot = await fetchPrSnapshot(params, signal)
124124
if (snapshot.state !== 'open') {
125-
throw new Error(`PR #${params.pullNumber} is ${snapshot.state}; only open PRs can be reviewed`)
125+
throw new Error(`PR #${params.pullNumber} is ${snapshot.state}; only open PRs are supported`)
126126
}
127127
return snapshot
128128
}

0 commit comments

Comments
 (0)