Convert a GitHub project draft into an issue
github_project_item_convertConvert a draft project board item into a repository issue, preserving its board fields and applying kind, labels, and milestone.
Instructions
Turn a draft item into an issue of a repository the viewer may write to: the draft's title and body become the issue, and the item stays on the board with its field values. The viewer must also be able to update the board; both are checked before anything is written. An item that is not a draft is invalid_argument. Then settle the issue as github_issue_create does: kind (an Issue Type, else a type: label that is created when missing), labels and milestone. A milestone that does not exist fails before the draft is converted unless create_milestone is true. Once the issue exists, a failed kind, labels or milestone step does not fail the call: it is listed in errors and the issue is still returned. An item is named by its node ID (PVTI_…), which also tells its board (a project given beside it must be that board), or by an issue or pull request (12, #12, owner/repo#12 or its URL) that is on the board the lookup finds. A draft can only be named by its ID. A board is named by project: its number, owner/number or its URL, used as it is; any other project is a title, and no project is Roadmap: the open board of that whole title is looked up, never guessed, in owner's boards if owner is given, else in the boards linked to repo, then its organization's, then the viewer's. Needs a token with the project scope; if GitHub reports missing scopes, run gh auth refresh -s project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | Yes | The draft item's node ID (PVTI_…); only a draft can be turned into an issue. | |
| kind | No | Such as bug or feature: the organization's Issue Type of that name, else the type:<kind> label. | |
| repo | No | owner/name of the repository the issue is created in; defaults to the working tree's repository (its origin). Also where the board lookup starts. | |
| owner | No | A user or organization login, or "@me": the owner of a numbered board, else the only owner searched for a title. | |
| labels | No | Labels to add; they must exist. | |
| project | No | The board, as its number, owner/number or its URL (used as it is; a bare number takes owner, else the owner of repo or of the working tree's repository), or as its title, looked up among open boards (whole title, case-insensitive). Default: the title Roadmap. | |
| milestone | No | A milestone title. | |
| create_milestone | No | Create the milestone when it does not exist; needs milestone. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Where the kind landed; null when none was given or its step failed. | |
| repo | Yes | owner/name of the repository the issue was created in. | |
| issue | Yes | ||
| errors | Yes | Failed steps, keyed by step (fields.<Field name>, blocked_by, kind, labels, milestone); {} when none. | |
| foreign | Yes | ||
| item_id | Yes | ||
| project | Yes | ||
| milestone | Yes | The milestone the call settled on; if errors.milestone is set it was not applied to the issue. |