@yemi33/minions 0.1.778 → 0.1.779
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/CHANGELOG.md +5 -0
- package/engine/ado.js +25 -0
- package/engine/github.js +16 -0
- package/engine/shared.js +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/engine/ado.js
CHANGED
|
@@ -418,6 +418,31 @@ async function pollPrStatus(config) {
|
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
|
|
421
|
+
// Auto-complete: set auto-complete on PR when builds green + review approved
|
|
422
|
+
if (pr.status === PR_STATUS.ACTIVE && pr.reviewStatus === 'approved' && pr.buildStatus === 'passing' && !pr._autoCompleted) {
|
|
423
|
+
const autoComplete = config.engine?.autoCompletePrs !== false;
|
|
424
|
+
if (autoComplete) {
|
|
425
|
+
try {
|
|
426
|
+
const mergeStrategy = config.engine?.prMergeMethod === 'merge' ? 1 : config.engine?.prMergeMethod === 'rebase' ? 2 : 3; // 3 = squash
|
|
427
|
+
const identityUrl = `${orgBase}/_apis/connectionData?api-version=7.1`;
|
|
428
|
+
const identity = await adoFetch(identityUrl, token).catch(() => null);
|
|
429
|
+
const autoCompleteUrl = `${orgBase}/${project.adoProject}/_apis/git/repositories/${project.repositoryId}/pullrequests/${prNum}?api-version=7.1`;
|
|
430
|
+
await adoFetch(autoCompleteUrl, token, {
|
|
431
|
+
method: 'PATCH',
|
|
432
|
+
body: JSON.stringify({
|
|
433
|
+
autoCompleteSetBy: { id: identity?.authenticatedUser?.id },
|
|
434
|
+
completionOptions: { mergeStrategy, deleteSourceBranch: true, transitionWorkItems: true }
|
|
435
|
+
})
|
|
436
|
+
});
|
|
437
|
+
pr._autoCompleted = true;
|
|
438
|
+
log('info', `Auto-complete set on PR ${pr.id}: builds green + review approved`);
|
|
439
|
+
updated = true;
|
|
440
|
+
} catch (e) {
|
|
441
|
+
log('warn', `Auto-complete failed for PR ${pr.id}: ${e.message}`);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
421
446
|
return updated;
|
|
422
447
|
} catch (err) {
|
|
423
448
|
// Auth errors → mark build status stale so dashboard shows uncertainty
|
package/engine/github.js
CHANGED
|
@@ -418,6 +418,22 @@ async function pollPrStatus(config) {
|
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
|
|
421
|
+
// Auto-complete: merge PR when builds green + review approved
|
|
422
|
+
if (pr.status === PR_STATUS.ACTIVE && pr.reviewStatus === 'approved' && pr.buildStatus === 'passing' && !pr._autoCompleted) {
|
|
423
|
+
const autoComplete = config.engine?.autoCompletePrs !== false; // default: on
|
|
424
|
+
if (autoComplete) {
|
|
425
|
+
try {
|
|
426
|
+
const mergeMethod = config.engine?.prMergeMethod || 'squash';
|
|
427
|
+
await execAsync(`gh pr merge ${prNum} --${mergeMethod} --repo ${slug} --delete-branch`, { timeout: 30000, encoding: 'utf-8' });
|
|
428
|
+
pr._autoCompleted = true;
|
|
429
|
+
log('info', `Auto-completed PR ${pr.id}: builds green + review approved → merged (${mergeMethod})`);
|
|
430
|
+
updated = true;
|
|
431
|
+
} catch (e) {
|
|
432
|
+
log('warn', `Auto-complete failed for PR ${pr.id}: ${e.message}`);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
421
437
|
return updated;
|
|
422
438
|
});
|
|
423
439
|
|
package/engine/shared.js
CHANGED
|
@@ -547,6 +547,8 @@ const ENGINE_DEFAULTS = {
|
|
|
547
547
|
lockRetryBackoffMs: 500, // base backoff between lock retries (doubles each attempt: 500ms, 1s, 2s, ...)
|
|
548
548
|
maxBuildFixAttempts: 3, // max consecutive auto-fix dispatch cycles per PR before escalation to human
|
|
549
549
|
buildFixGracePeriod: 600000, // 10min — wait for CI to run after build fix before re-dispatching
|
|
550
|
+
autoCompletePrs: true, // auto-merge PRs when builds green + review approved
|
|
551
|
+
prMergeMethod: 'squash', // merge method: squash, merge, rebase
|
|
550
552
|
ccModel: 'sonnet', // model for Command Center and doc-chat (sonnet, haiku, opus)
|
|
551
553
|
ccEffort: null, // effort level for CC/doc-chat (null, 'low', 'medium', 'high')
|
|
552
554
|
ccMaxTurns: 50, // max tool-use turns for CC/doc-chat before CLI stops
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.779",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|