fix: address review findings (#2339)

This commit is contained in:
Jinjing
2026-05-19 13:03:47 -07:00
committed by GitHub
parent 05286ce00b
commit 9bbfb04a09
13 changed files with 1105 additions and 162 deletions
+14 -1
View File
@@ -27,7 +27,7 @@ vi.mock('./gh-utils', async () => {
}
})
import { createIssue, getIssue, listIssues } from './issues'
import { createIssue, getIssue, listIssues, updateIssue } from './issues'
describe('issue source operations', () => {
beforeEach(() => {
@@ -125,4 +125,17 @@ describe('issue source operations', () => {
{ cwd: '/repo-root' }
)
})
it('updates issue body through the REST issue endpoint', async () => {
getIssueOwnerRepoMock.mockResolvedValueOnce({ owner: 'stablyai', repo: 'orca' })
ghExecFileAsyncMock.mockResolvedValueOnce({ stdout: '' })
await expect(updateIssue('/repo-root', 924, { body: 'Updated body' })).resolves.toEqual({
ok: true
})
expect(ghExecFileAsyncMock).toHaveBeenCalledWith(
['api', '-X', 'PATCH', 'repos/stablyai/orca/issues/924', '--raw-field', 'body=Updated body'],
{ cwd: '/repo-root' }
)
})
})