opencode-magi 0.0.0-dev-20260522221258 → 0.0.0-dev-20260522221722
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/dist/github/commands.js
CHANGED
|
@@ -650,6 +650,17 @@ export async function waitForMergeQueue(exec, repository, pr, intervalMs = 30_00
|
|
|
650
650
|
await new Promise((resolve) => setTimeout(resolve, intervalMs));
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
|
+
export async function waitForAutoMerge(exec, repository, pr, intervalMs = 30_000) {
|
|
654
|
+
for (;;) {
|
|
655
|
+
const status = await fetchPullRequestMergeStatus(exec, repository, pr);
|
|
656
|
+
if (status.state === "MERGED")
|
|
657
|
+
return "merged";
|
|
658
|
+
if (status.state !== "OPEN" || status.autoMergeRequest == null) {
|
|
659
|
+
return "dequeued";
|
|
660
|
+
}
|
|
661
|
+
await new Promise((resolve) => setTimeout(resolve, intervalMs));
|
|
662
|
+
}
|
|
663
|
+
}
|
|
653
664
|
export async function closePullRequest(exec, repository, pr, account) {
|
|
654
665
|
const token = await ghToken(exec, repository, account);
|
|
655
666
|
return exec(`gh pr close ${pr} --repo ${shellQuote(repoSpecifier(repository))}`, ghTokenEnv(token));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { prRunOutputDir } from "../config/output";
|
|
4
|
-
import { closePullRequest, configureGitIdentity, fetchMergeQueueRequirement, fetchPullRequest, fetchUnresolvedThreads, mergePullRequest, postApproval, postChangesRequested, postCloseComment, postReply, pushHead, removeWorktree, resolveThread, waitForMergeQueue, } from "../github/commands";
|
|
4
|
+
import { closePullRequest, configureGitIdentity, fetchMergeQueueRequirement, fetchPullRequest, fetchUnresolvedThreads, mergePullRequest, postApproval, postChangesRequested, postCloseComment, postReply, pushHead, removeWorktree, resolveThread, waitForAutoMerge, waitForMergeQueue, } from "../github/commands";
|
|
5
5
|
import { composeEditPrompt, composeRereviewCloseReconsiderationPrompt, composeRereviewPrompt, } from "../prompts/compose";
|
|
6
6
|
import { parseEditOutput, parseRereviewCloseReconsiderationOutput, parseRereviewOutput, } from "../prompts/output";
|
|
7
7
|
import { throwIfAborted, withAbortSignal } from "./abort";
|
|
@@ -53,7 +53,7 @@ async function withReviewerFailureProgress(input) {
|
|
|
53
53
|
async function runEditor(input, worktreePath, cycle, reviewFindings, unresolvedThreads) {
|
|
54
54
|
const editor = input.repository.agents.editor;
|
|
55
55
|
if (!editor)
|
|
56
|
-
throw new Error("
|
|
56
|
+
throw new Error("merge.editor is required for magi_merge");
|
|
57
57
|
throwIfAborted(input.signal);
|
|
58
58
|
await configureGitIdentity(input.exec, worktreePath, {
|
|
59
59
|
email: editor.author?.email,
|
|
@@ -426,8 +426,11 @@ async function finishMergeRun(input, result, reportInput) {
|
|
|
426
426
|
}
|
|
427
427
|
async function mergeWithQueue(input, exec, editorAccount) {
|
|
428
428
|
await mergePullRequest(exec, input.repository, input.pr, editorAccount);
|
|
429
|
-
if (!input.repository.merge.mergeQueue)
|
|
430
|
-
|
|
429
|
+
if (!input.repository.merge.mergeQueue) {
|
|
430
|
+
if (!input.repository.merge.auto)
|
|
431
|
+
return "merged";
|
|
432
|
+
return waitForAutoMerge(exec, input.repository, input.pr);
|
|
433
|
+
}
|
|
431
434
|
return waitForMergeQueue(exec, input.repository, input.pr);
|
|
432
435
|
}
|
|
433
436
|
export function hasBlockingCiReports(reports) {
|
|
@@ -587,7 +590,7 @@ export async function runMerge(input) {
|
|
|
587
590
|
const abortableInput = { ...input, exec };
|
|
588
591
|
const editor = input.repository.agents.editor;
|
|
589
592
|
if (!editor)
|
|
590
|
-
throw new Error("
|
|
593
|
+
throw new Error("merge.editor is required for magi_merge");
|
|
591
594
|
throwIfAborted(input.signal);
|
|
592
595
|
const artifactDir = outputDir(input);
|
|
593
596
|
await mkdir(artifactDir, { recursive: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-magi",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260522221722",
|
|
4
4
|
"description": "Multi-agent PR review and merge orchestration plugin for OpenCode.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Hirotomo Yamada <hirotomo.yamada@avap.co.jp>",
|