feat: add merge capability with approval confirmation to cmd_continue prompt
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user