fix: update review-poll.sh approval injection to include merge commands
The APPROVE injection previously told the dev-agent to write PHASE:done and let the orchestrator merge. Now the dev-agent merges directly, so the injection includes the full merge + issue-close curl commands matching the pattern already in the dev-agent.sh prompt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f73d5f471e
commit
775c290660
1 changed files with 18 additions and 2 deletions
|
|
@ -128,8 +128,24 @@ inject_review_into_dev_session() {
|
|||
local inject_msg=""
|
||||
if [ "${verdict}" = "APPROVE" ]; then
|
||||
inject_msg="Approved! PR #${pr_num} has been approved by the reviewer.
|
||||
Write PHASE:done to the phase file — the orchestrator will handle the merge:
|
||||
echo \"PHASE:done\" > \"${phase_file}\""
|
||||
Merge the PR and close the issue, then signal done:
|
||||
|
||||
curl -sf -X POST \\
|
||||
-H \"Authorization: token \$CODEBERG_TOKEN\" \\
|
||||
-H 'Content-Type: application/json' \\
|
||||
\"${API_BASE}/pulls/${pr_num}/merge\" \\
|
||||
-d '{\"Do\":\"merge\",\"delete_branch_after_merge\":true}'
|
||||
|
||||
curl -sf -X PATCH \\
|
||||
-H \"Authorization: token \$CODEBERG_TOKEN\" \\
|
||||
-H 'Content-Type: application/json' \\
|
||||
\"${API_BASE}/issues/${issue_num}\" \\
|
||||
-d '{\"state\":\"closed\"}'
|
||||
|
||||
echo \"PHASE:done\" > \"${phase_file}\"
|
||||
|
||||
If merge fails due to conflicts, rebase first then retry.
|
||||
If merge repeatedly fails, write PHASE:needs_human."
|
||||
elif [ "${verdict}" = "REQUEST_CHANGES" ] || [ "${verdict}" = "DISCUSS" ]; then
|
||||
inject_msg="Review: ${verdict} on PR #${pr_num}:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue