MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/smart-sdlc / getFileFromRepo

Function getFileFromRepo

wiki-interface/lib/git/utils.js:107–116  ·  view source on GitHub ↗
(repo, file)

Source from the content-addressed store, hash-verified

105
106/* Get file contents */
107async function getFileFromRepo(repo, file) {
108 let dir = path.join(process.cwd(), repo);
109 try {
110 let contents = await fs.readFileSync(dir + "/" + file);
111 return contents;
112 } catch (err) {
113 console.log(JSON.stringify(err));
114 return null;
115 }
116}
117
118module.exports.cloneGitRepo = cloneGitRepo;
119module.exports.cloneWiki = cloneWiki;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected