Refresh GitHub issues after creation (#3018)

Implements the no-cache GitHub issue list refresh path described in docs/refresh-github-issues-after-create.md.

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Jinwoo Hong
2026-05-28 21:14:58 -04:00
committed by GitHub
co-authored by Orca
parent bf51593706
commit 153fd863c6
16 changed files with 347 additions and 29 deletions
@@ -140,6 +140,27 @@ describe('GitHub issue source split', () => {
)
})
it('omits gh api cache args for no-cache recent work-item requests', async () => {
getIssueOwnerRepoMock.mockResolvedValueOnce({ owner: 'stablyai', repo: 'orca' })
getOwnerRepoMock.mockResolvedValueOnce({ owner: 'fork', repo: 'orca' })
ghExecFileAsyncMock.mockResolvedValueOnce({ stdout: '[]' }).mockResolvedValueOnce({
stdout: '[]'
})
await listWorkItems('/repo-root', 10, undefined, undefined, undefined, undefined, true)
expect(ghExecFileAsyncMock).toHaveBeenNthCalledWith(
1,
['api', 'repos/stablyai/orca/issues?per_page=10&state=open&sort=updated&direction=desc'],
{ cwd: '/repo-root' }
)
expect(ghExecFileAsyncMock).toHaveBeenNthCalledWith(
2,
['api', 'repos/fork/orca/pulls?per_page=10&state=open&sort=updated&direction=desc'],
{ cwd: '/repo-root' }
)
})
it('lists SSH repo work items with explicit owner/repo and no local cwd', async () => {
resolveIssueSourceMock.mockResolvedValueOnce({
source: { owner: 'stablyai', repo: 'orca' },