mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 07:13:58 +00:00
refactor(deadcode): localize test and tooling helpers (#101875)
This commit is contained in:
@@ -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)}`);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user