MCPcopy Create free account
hub / github.com/EvoMap/evolver / runGh

Function runGh

src/gep/selfPR.js:254–269  ·  view source on GitHub ↗
(args, opts)

Source from the content-addressed store, hash-verified

252}
253
254function runGh(args, opts) {
255 const timeoutMs = (opts && opts.timeoutMs) || SELF_PR_TIMEOUT_MS;
256 const cwd = (opts && opts.cwd) || getRepoRoot();
257 try {
258 const result = execSync('gh ' + args, {
259 cwd: cwd,
260 timeout: timeoutMs,
261 encoding: 'utf8',
262 stdio: ['pipe', 'pipe', 'pipe'],
263 env: Object.assign({}, process.env), maxBuffer: MAX_EXEC_BUFFER
264 });
265 return { ok: true, out: String(result || '').trim() };
266 } catch (e) {
267 return { ok: false, out: '', err: String(e && e.stderr ? e.stderr : e.message || e).slice(0, 500) };
268 }
269}
270
271function getGitDiff(changedFiles, repoRoot) {
272 const parts = [];

Callers 1

maybeCreatePRFunction · 0.85

Calls 1

getRepoRootFunction · 0.85

Tested by

no test coverage detected