MCPcopy Create free account
hub / github.com/angular/dev-infra / getFilesForRepo

Function getFilesForRepo

github-actions/org-file-sync/lib/main.ts:29–39  ·  view source on GitHub ↗

Retrieve the files from Github which are syncronized for a given repo.

(github: Octokit, repo: string)

Source from the content-addressed store, hash-verified

27
28/** Retrieve the files from Github which are syncronized for a given repo. */
29async function getFilesForRepo(github: Octokit, repo: string): Promise<Files> {
30 core.startGroup(`Retrieving files from "${repo}" repo`);
31 const fileMap = new Map<string, File | null>();
32 for (const path of filesToSync) {
33 fileMap.set(path, await getFile(github, repo, path));
34 }
35 const fileCount = [...fileMap.values()].filter((file) => file !== null).length;
36 core.info(`Retrieved ${fileCount} file(s)`);
37 core.endGroup();
38 return fileMap;
39}
40
41/**
42 * Retrieve the file content for a specified file, properly handling the file not existing in the

Callers 2

updateRepoWithFilesFunction · 0.85
mainFunction · 0.85

Calls 2

getFileFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected