mirror of
https://github.com/stablyai/orca.git
synced 2026-10-20 00:03:45 +00:00
Support GitHub Enterprise diffs and mutations with host-scoped caches
Parse GitHub host identity from work-item URLs and carry it through PR/issue mutations, labels, and assignments. Bound rate-limit and scope-probe caches (1024 and 512 entries) to prevent unbounded growth when interacting with multiple GHES instances. Normalize repository identity keys to include host so github.com and GHES slugs don't collide in cache and equality checks.
This commit is contained in:
@@ -2486,10 +2486,6 @@ function parseTrackedUpstreamBranch(upstreamRef: string): TrackedUpstreamBranch
|
||||
return parsed
|
||||
}
|
||||
|
||||
function prOwnerRepoKey(ownerRepo: OwnerRepo): string {
|
||||
return `${ownerRepo.owner.toLowerCase()}/${ownerRepo.repo.toLowerCase()}`
|
||||
}
|
||||
|
||||
function shouldRetryTrackedUpstreamBranch(
|
||||
upstreamBranch: TrackedUpstreamBranch,
|
||||
branchName: string,
|
||||
@@ -2502,7 +2498,7 @@ function shouldRetryTrackedUpstreamBranch(
|
||||
if (!headRepo) {
|
||||
return true
|
||||
}
|
||||
return prOwnerRepoKey(upstreamHeadRepo) !== prOwnerRepoKey(headRepo)
|
||||
return githubRepoIdentityKey(upstreamHeadRepo) !== githubRepoIdentityKey(headRepo)
|
||||
}
|
||||
|
||||
async function getTrackedUpstreamBranch(
|
||||
|
||||
Reference in New Issue
Block a user