autopilot-code 0.0.19 → 0.0.21
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/scripts/run_autopilot.py +6 -3
package/package.json
CHANGED
package/scripts/run_autopilot.py
CHANGED
|
@@ -330,7 +330,7 @@ def check_pr_for_issue(cfg: RepoConfig, issue_number: int) -> dict[str, Any] | N
|
|
|
330
330
|
"--head",
|
|
331
331
|
branch,
|
|
332
332
|
"--json",
|
|
333
|
-
"number,title,state,mergeable,mergeStateStatus,url,
|
|
333
|
+
"number,title,state,mergeable,mergeStateStatus,url,mergedAt,closed,headRefName",
|
|
334
334
|
"--limit",
|
|
335
335
|
"1",
|
|
336
336
|
]
|
|
@@ -488,7 +488,7 @@ def try_merge_pr(cfg: RepoConfig, issue_number: int, pr: dict[str, Any]) -> bool
|
|
|
488
488
|
pr_url = pr["url"]
|
|
489
489
|
|
|
490
490
|
# If already merged or closed, mark issue as done
|
|
491
|
-
if pr.get("
|
|
491
|
+
if pr.get("mergedAt") or pr.get("closed"):
|
|
492
492
|
print(f"[{cfg.repo}] PR #{pr_number} is already merged/closed, marking issue #{issue_number} as done", flush=True)
|
|
493
493
|
sh(["gh", "issue", "edit", str(issue_number), "--repo", cfg.repo,
|
|
494
494
|
"--add-label", cfg.label_done, "--remove-label", cfg.label_in_progress])
|
|
@@ -738,9 +738,12 @@ def run_cycle(
|
|
|
738
738
|
|
|
739
739
|
# If agent==opencode, delegate to bash script
|
|
740
740
|
if cfg.agent == "opencode":
|
|
741
|
+
# Script is in the same directory as this Python file
|
|
742
|
+
script_dir = Path(__file__).parent
|
|
743
|
+
script_path = script_dir / "run_opencode_issue.sh"
|
|
741
744
|
sh(
|
|
742
745
|
[
|
|
743
|
-
|
|
746
|
+
str(script_path),
|
|
744
747
|
str(cfg.root),
|
|
745
748
|
str(issue["number"]),
|
|
746
749
|
]
|