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:
Jinjing
2026-07-20 12:35:26 -07:00
parent 02206e6a0f
commit ee835fcdfb
22 changed files with 275 additions and 42 deletions
+1 -5
View File
@@ -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(