Merge pull request
project_pr_mergeMerge a pull request using merge, squash, or rebase and optionally delete the head branch, refusing closed or conflicting PRs.
Instructions
Merge a pull request (merge/squash/rebase) and optionally delete the head branch. Refuses cleanly when the PR is closed or conflicting. Use when: CI is green and the user asked to land the PR. Use method=squash for a single commit. Avoid when: checks are still running (project_ci_status first), or the user only wants a review comment. Speed: 2-3 API calls (state check, merge, optional branch delete). Output: pr_merge: repo, provider, pr, merged, method, sha, head, base, branch_deleted, note?. Batch-safe: no
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pr | Yes | PR number or PR URL. | |
| repo | No | Repository as "owner/name" or a PR URL (default: VENIRA_GIT_REPO, git.repo in venira.config.json, else the workspace .git origin remote). | |
| method | No | Merge strategy (default: merge). | |
| reason | No | Why this change is made (e.g. "sua loi null pointer o dong 45"). Recorded in the audit trail so later sessions know the intent. Single line, max 400 chars, secrets are redacted. | |
| provider | No | Provider override for this call (default: VENIRA_GIT_PROVIDER, then venira.config.json, then inferred from the origin remote). | |
| commit_title | No | Title for the merge commit (squash/merge). | |
| delete_branch | No | Delete the head branch after a successful merge (same-repo branches only). | |
| commit_message | No | Body for the merge commit. |