refactor(deadcode): localize test and tooling helpers (#101875)

This commit is contained in:
Vincent Koc
2026-07-07 13:45:26 -07:00
committed by GitHub
parent f565138ddc
commit d563101a82
39 changed files with 47 additions and 54 deletions

View File

@@ -253,7 +253,7 @@ export function isDependencyGuardMarkerComment(comment, marker, trustedAuthors)
return Boolean(login && trustedAuthors.has(login) && comment.body?.includes(marker));
}
export function renderDependencyAwarenessComment(dependencyFiles) {
function renderDependencyAwarenessComment(dependencyFiles) {
const listedFiles = dependencyFiles.slice(0, maxListedFiles);
const omittedCount = dependencyFiles.length - listedFiles.length;
const fileLines = listedFiles.map((filename) => `- ${markdownCode(filename)}`);

View File

@@ -66,7 +66,7 @@ function createTooLargeGitHubApiBodyError(label, maxBytes) {
return error;
}
export async function withGitHubApiTimeout(label, timeoutMs, run) {
async function withGitHubApiTimeout(label, timeoutMs, run) {
const boundedTimeoutMs = Math.max(1, timeoutMs);
const controller = new AbortController();
const timeoutError = createTimeoutError(label, boundedTimeoutMs);
@@ -168,7 +168,7 @@ function isAutomationUser(user = {}, fallbackLogin = "") {
return user?.type === "Bot" || /\[bot\]$/i.test(login) || login.startsWith("app/");
}
export function isExternalPullRequest(pullRequest) {
function isExternalPullRequest(pullRequest) {
if (!pullRequest) {
return false;
}