@jojonax/codex-copilot 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/run.js +2 -1
- package/src/utils/github.js +14 -0
package/package.json
CHANGED
package/src/commands/run.js
CHANGED
|
@@ -429,7 +429,8 @@ async function reviewLoop(projectDir, task, prInfo, { maxRounds: _maxRounds, pol
|
|
|
429
429
|
|
|
430
430
|
// Push fix — only if there are actual changes
|
|
431
431
|
if (!git.isClean(projectDir)) {
|
|
432
|
-
|
|
432
|
+
const skipCI = github.isPrivateRepo(projectDir) ? ' [skip ci]' : '';
|
|
433
|
+
git.commitAll(projectDir, `fix(task-${task.id}): address review comments (round ${round})${skipCI}`);
|
|
433
434
|
git.pushBranch(projectDir, task.branch);
|
|
434
435
|
log.info('Fix pushed, waiting for next review round...');
|
|
435
436
|
// Brief wait for review bot to react
|
package/src/utils/github.js
CHANGED
|
@@ -292,9 +292,23 @@ export function collectReviewFeedback(cwd, prNumber) {
|
|
|
292
292
|
return feedback.trim();
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
+
/**
|
|
296
|
+
* Check if the current repo is private
|
|
297
|
+
* @returns {boolean} true if private, false if public or unknown
|
|
298
|
+
*/
|
|
299
|
+
export function isPrivateRepo(cwd) {
|
|
300
|
+
try {
|
|
301
|
+
const result = ghJSON('repo view --json isPrivate', cwd);
|
|
302
|
+
return result?.isPrivate === true;
|
|
303
|
+
} catch {
|
|
304
|
+
return false; // Default to public behavior if detection fails
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
295
308
|
export const github = {
|
|
296
309
|
checkGhAuth, createPR, createPRWithRecovery, findExistingPR,
|
|
297
310
|
ensureRemoteBranch, hasCommitsBetween,
|
|
298
311
|
getReviews, getReviewComments, getIssueComments,
|
|
299
312
|
getLatestReviewState, mergePR, collectReviewFeedback,
|
|
313
|
+
isPrivateRepo,
|
|
300
314
|
};
|