From 19ade67a99cb8dc7993e11eea267efa0a901e528 Mon Sep 17 00:00:00 2001 From: shokollm <270575765+shokollm@users.noreply.github.com> Date: Tue, 7 Apr 2026 06:04:28 +0000 Subject: [PATCH] feat: add merge capability with approval confirmation to cmd_continue prompt --- skills/kugetsu/scripts/kugetsu-session.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/skills/kugetsu/scripts/kugetsu-session.sh b/skills/kugetsu/scripts/kugetsu-session.sh index 03ca4ae..f35fb0b 100755 --- a/skills/kugetsu/scripts/kugetsu-session.sh +++ b/skills/kugetsu/scripts/kugetsu-session.sh @@ -285,6 +285,13 @@ You may need to: - Reply to PR comments using: curl -X POST "https://$instance/api/v1/repos/$owner/$repo/issues/$number/comments" -H "Authorization: Bearer \$GITEA_TOKEN" -H "Content-Type: application/json" -d '{"body":"Your reply here"}' - Or do both +MERGING: If instructed to merge, you MUST confirm approval first before merging: +- Check for PR approval via: curl -s "https://$instance/api/v1/repos/$owner/$repo/pulls/$number/reviews" -H "Authorization: Bearer \$GITEA_TOKEN" +- Check for "lgtm" or "approved" in comments: curl -s "https://$instance/api/v1/repos/$owner/$repo/issues/$number/comments" -H "Authorization: Bearer \$GITEA_TOKEN" +- Only merge if you see approval OR the instruction explicitly says to merge (e.g., "merge the PR", "please merge", "go ahead and merge") +- To merge: tea pr merge --repo $owner/$repo $number --style merge +- If no approval yet, reply asking for review/approval first + Delegator's message: $user_message @@ -315,6 +322,9 @@ Tools for PR interaction: - Post issue/PR comment: curl -X POST "https://$instance/api/v1/repos/$owner/$repo/issues/$number/comments" -H "Authorization: Bearer \$GITEA_TOKEN" -H "Content-Type: application/json" -d '{"body":"Your comment"}' - List PR comments: curl -s "https://$instance/api/v1/repos/$owner/$repo/issues/$number/comments" -H "Authorization: Bearer \$GITEA_TOKEN" - List PR reviews: curl -s "https://$instance/api/v1/repos/$owner/$repo/pulls/$number/reviews" -H "Authorization: Bearer \$GITEA_TOKEN" +- Merge PR (only with approval): tea pr merge --repo $owner/$repo $number --style merge + - MERGING requires approval first! Check for: approval in reviews, OR "lgtm"/"approved" in comments + - If no approval, ask reviewer to approve first before merging Work directory: $worktree_path EOF -- 2.49.1