MCPcopy Index your code
hub / github.com/leonhartX/gas-github / getCode

Method getCode

src/scm/github.js:214–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

212 }
213
214 getCode() {
215 let code;
216 if (isGist()) {
217 code = this.getGistCode();
218 } else {
219 code = this.getRepoCode();
220 }
221 return code.then(code => {
222 return code.reduce((hash, elem) => {
223 if (elem) {
224 hash[elem.file] = elem.content;
225 }
226 return hash;
227 }, {})
228 });
229 }
230
231 getRepoCode() {
232 return new Promise((resolve, reject) => {

Callers

nothing calls this directly

Calls 3

getGistCodeMethod · 0.95
getRepoCodeMethod · 0.95
isGistFunction · 0.85

Tested by

no test coverage detected