fix: address review findings (#2206)

This commit is contained in:
Jinjing
2026-05-17 20:15:05 -07:00
committed by GitHub
parent 4634ffb4d3
commit e4a794ec68
20 changed files with 2244 additions and 193 deletions
@@ -281,6 +281,25 @@ describe('github RPC methods', () => {
expect(response).toMatchObject({ ok: true, result: { ok: true } })
})
it('updates PR state on the runtime server', async () => {
const runtime = {
getRuntimeId: () => 'test-runtime',
updateRepoPRState: vi.fn().mockResolvedValue({ ok: true })
} as unknown as OrcaRuntimeService
const dispatcher = new RpcDispatcher({ runtime, methods: GITHUB_METHODS })
const response = await dispatcher.dispatch(
makeRequest('github.updatePRState', {
repo: 'repo-1',
prNumber: 7,
updates: { state: 'closed' }
})
)
expect(runtime.updateRepoPRState).toHaveBeenCalledWith('repo-1', 7, { state: 'closed' })
expect(response).toMatchObject({ ok: true, result: { ok: true } })
})
it('creates issues on the runtime server', async () => {
const runtime = {
getRuntimeId: () => 'test-runtime',