From 8219695eb1fd8803c445b915a4e2d72434ee312a Mon Sep 17 00:00:00 2001 From: xfodev Date: Wed, 22 Jul 2026 08:25:35 -0700 Subject: [PATCH] fix(extension): remove dead matchPullRequestTarget from content script (#8023) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #7487 narrowed matchGitHubPageTarget to pull/* pages and simplified the target guard, leaving matchPullRequestTarget behind — a stranded duplicate of matchGitHubPageTarget minus its `kind` field. It has no production caller; it was only re-exported through the __loopoverContentInternals test-hook, which apps/loopover-extension has no test suite to consume. Remove the function and its __loopoverContentInternals entry. Pure dead-code removal, no behavior change; matchGitHubPageTarget (the canonical matcher, still used by the content-script guard) is untouched. Closes #8023 --- apps/loopover-extension/content.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/apps/loopover-extension/content.js b/apps/loopover-extension/content.js index 29f94aed4a..f5e58b5306 100644 --- a/apps/loopover-extension/content.js +++ b/apps/loopover-extension/content.js @@ -13,12 +13,6 @@ function matchGitHubPageTarget(pathname) { return { kind: "pull_request", owner, repo, pullNumber: Number(number) }; } -function matchPullRequestTarget(pathname) { - const target = matchGitHubPageTarget(pathname); - if (!target) return null; - return { owner: target.owner, repo: target.repo, pullNumber: target.pullNumber }; -} - function mountOverlay(target) { if (document.querySelector("[data-loopover-pr-context]")) return; const container = document.createElement("aside"); @@ -192,7 +186,6 @@ function renderActions(body, actions) { if (globalThis.__LOOPOVER_EXTENSION_TEST__) { globalThis.__loopoverContentInternals = { matchGitHubPageTarget, - matchPullRequestTarget, createOverlayLoader, renderPullContext, renderSection,