MCPcopy Index your code
hub / github.com/promptfoo/promptfoo / fetchBaseBranch

Function fetchBaseBranch

code-scan-action/src/main.ts:240–250  ·  view source on GitHub ↗
(baseBranch: string)

Source from the content-addressed store, hash-verified

238}
239
240async function fetchBaseBranch(baseBranch: string): Promise<void> {
241 core.info(`📥 Fetching base branch: ${baseBranch}...`);
242
243 try {
244 await exec.exec('git', ['fetch', 'origin', `${baseBranch}:${baseBranch}`]);
245 core.info(`✅ Base branch ${baseBranch} fetched successfully`);
246 } catch (error) {
247 core.warning(`Failed to fetch base branch ${baseBranch}: ${formatError(error)}`);
248 core.warning('Git diff may fail if base branch is not available');
249 }
250}
251
252function buildCliArgs(
253 apiHost: string,

Callers 1

runCodeScanFunction · 0.85

Calls 1

formatErrorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…