Link a development branch to a GitHub issue
github_issue_developCreate or retrieve a GitHub branch linked to an issue via the API without local fetch or checkout; optionally reuse or name the branch.
Instructions
Create a branch on GitHub linked to an issue (its Development panel), or return the linked branch that exists already. It goes through the API: nothing is fetched or checked out locally. With branch, a linked branch of that name is reused; without it, the first linked branch in the branch repository. A new branch starts from base (it must exist) or the default branch. A pull request opened from a linked branch closes the issue when it merges, with no closing keyword; use a plain branch when the first merge should not close it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | The branch to start from, which must exist; defaults to the branch repository's default branch. | |
| repo | No | owner/name; defaults to the working tree's repository (its origin). Used for a bare number. | |
| issue | Yes | The issue, as 12, #12, owner/repo#12 or its URL. | |
| branch | No | The branch name; when left out, a linked branch in the branch repository is reused, else GitHub names one. | |
| branch_repo | No | owner/name of the repository to create the branch in; defaults to the issue's repository. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | The branch it was started from; null for a branch that already existed. | |
| repo | Yes | ||
| issue | Yes | ||
| branch | Yes | ||
| created | Yes | False when a linked branch already existed and nothing was sent. | |
| foreign | Yes | ||
| branch_repo | Yes | owner/name of the repository that holds the branch. | |
| linked_branches | Yes | Every branch linked to the issue now. |