Add an issue or pull request to a GitHub project
github_project_item_addAdd an issue or pull request to a GitHub project board and set field values in the same call; adding an existing item returns it without duplicate creation.
Instructions
Put an issue or pull request on a project board the viewer may update, and set field values in the same call. Adding is idempotent: one that is already on the board (archived or not) is returned as it is (created: false) and only the given fields are set. A new item with no Status given starts as Waiting when it is an issue with an open blocking issue and the board has a Waiting option, else as Todo when the board has that option; a board without a Status single select gets no default. Once the item is on the board, a field that fails to set does not fail the call: it is listed in errors as fields., and the item is still returned. If the blocking issues cannot be read the item starts as Todo and errors.blocked_by says why. Field values are set by field name and option or iteration name, matched without regard to case: text as a string, number as a number or numeric string, date as YYYY-MM-DD, single select as an option name, iteration as an iteration title or @current (the iteration containing today, UTC). Only text, number, date, single select and iteration fields can be set; a column that mirrors an issue field is set with the issue tools' issue_fields, not here. GitHub's own (Title, Assignees, Labels, Milestone, Repository, Linked pull requests, …) are set on the issue, and github_issue_edit sets assignees, labels and milestone. Every field and value is checked before anything is written. 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 issue or pull request to put on the board: 12, #12, owner/repo#12 or its URL; a bare number means repo, else the working tree's repository. | |
| repo | No | owner/name; defaults to the working tree's repository (its origin). Where the board lookup starts, the owner of a bare board number, and the repository of a bare issue or pull request number. | |
| owner | No | A user or organization login, or "@me": the owner of a numbered board, else the only owner searched for a title. | |
| fields | No | Field values to set, by field name: {"Status": "Todo", "Target": "2026-12-01"}. Values are text, a number, a YYYY-MM-DD date, an option name or an iteration title (@current is the one containing today). A column that mirrors an issue field is set with the issue tools' issue_fields, not here. | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| errors | Yes | Failed steps, keyed by step (fields.<Field name>, blocked_by, kind, labels, milestone); {} when none. | |
| fields | Yes | The values that were set, by field name as the board spells it: an option or iteration by its name, a number as a number. | |
| content | Yes | ||
| created | Yes | false when the issue or pull request was already on the board. | |
| item_id | Yes | The project item's node ID (PVTI_…). | |
| project | Yes | ||
| archived | Yes | Whether the item is archived; an archived item that was already there stays so. |