Create issue development branch
gh_create_branchCreate a GitHub branch linked to a specified issue, resolving the base to an exact commit and verifying branch ref and target SHA before finishing.
Instructions
Additive write: create exactly one branch linked to the specified issue after ordinary write authorization. The requested or default branch-name base is resolved to an exact commit and rechecked immediately before one mutation. Authoritative bounded readback verifies the exact issue association, branch ref, and target SHA. Full commit SHAs in base are rejected; use gh_create_branch_from_sha for a caller-supplied immutable base. The operation never moves or deletes refs and never blindly retries an ambiguous mutation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Existing branch-name base resolved to an exact commit immediately before creation; full commit SHAs are rejected. | |
| name | Yes | New development branch name. | |
| repo | Yes | GitHub repository name without the owner prefix. | |
| owner | Yes | GitHub repository owner or organization login. | |
| issue_number | Yes | Positive issue number to link to the new development branch. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | ||
| name | Yes | ||
| created | Yes | ||
| message | Yes | ||
| warning | No | ||
| base_sha | Yes | ||
| request_id | No | ||
| write_completed | Yes | ||
| linked_branch_id | No | ||
| readback_completed | Yes | ||
| precondition_checked | Yes | ||
| state_matches_requested | Yes |