MCPcopy Create free account
hub / github.com/Tencent/teamai-cli / redactCloneOutput

Function redactCloneOutput

src/providers/gitcode/gitcode-api.ts:170–172  ·  view source on GitHub ↗

Redact an embedded oauth2 token from git output before logging/throwing.

(output: string)

Source from the content-addressed store, hash-verified

168
169/** Redact an embedded oauth2 token from git output before logging/throwing. */
170function redactCloneOutput(output: string): string {
171 return sanitizeGitUrl(output.replace(/oauth2:[^@]+@/g, 'oauth2:***@')).trim();
172}
173
174/**
175 * Clone a GitCode repo to localPath. The token is embedded in the remote URL so

Callers 1

gitcodeRepoCloneFunction · 0.85

Calls 1

sanitizeGitUrlFunction · 0.85

Tested by

no test coverage detected