mirror of
https://github.com/stablyai/orca.git
synced 2026-11-01 01:27:35 +00:00
fix(github): scope PR selection and clear rejected cached links
Apply the default-branch policy while probing each repository, so an integration PR cannot preempt a valid result or suppress the same number in another repository. Check branch heads by repository and server. Invalidate remote defaults when their review scope or SSH provider changes. Report rejected PR URLs through an optional refresh-result field, so merged integration PRs clear from both caches even at the current worktree head. Share the manual and coordinator cache update implementation. Co-authored-by: petersindex <287557875+petersindex@users.noreply.github.com>
This commit is contained in:
committed by
Neil
co-authored by
petersindex
parent
0bc07c9954
commit
82c5484f66
@@ -19,6 +19,13 @@ describe('normalizeGitHubPRForBranchOutcome', () => {
|
||||
expect(normalizeGitHubPRForBranchOutcome(outcome, 20)).toBe(outcome)
|
||||
})
|
||||
|
||||
it.each([
|
||||
{ kind: 'no-pr' as const, fetchedAt: 10 },
|
||||
{ kind: 'no-pr' as const, fetchedAt: 10, rejectedPRUrls: [PR.url] }
|
||||
])('preserves no-PR responses from older and newer hosts', (outcome) => {
|
||||
expect(normalizeGitHubPRForBranchOutcome(outcome, 20)).toEqual(outcome)
|
||||
})
|
||||
|
||||
it('normalizes legacy PRInfo and null responses', () => {
|
||||
expect(normalizeGitHubPRForBranchOutcome(PR, 20)).toEqual({
|
||||
kind: 'found',
|
||||
|
||||
@@ -22,7 +22,7 @@ export type PRRefreshUpstreamErrorType = PRRefreshErrorType
|
||||
|
||||
export type PRRefreshOutcome =
|
||||
| { kind: 'found'; pr: PRInfo; fetchedAt: number }
|
||||
| { kind: 'no-pr'; fetchedAt: number }
|
||||
| { kind: 'no-pr'; fetchedAt: number; rejectedPRUrls?: string[] }
|
||||
| {
|
||||
kind: 'upstream-error'
|
||||
errorType: PRRefreshErrorType
|
||||
|
||||
Reference in New Issue
Block a user