GitHub: Update an issue
GitHub issues.issuesUpdate: arguments, response, policy and SDK examples.
← Issues operations · Get started
Operation github.issues_update
Provider route: PATCH /repos/{owner}/{repo}/issues/{issue_number}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/github with npm, or alter-sdk-github with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { GitHubIntegration } from "@alter-ai/github";
async function execute(input: Parameters<GitHubIntegration["issues"]["issuesUpdate"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new GitHubIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.issues.issuesUpdate(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_github import GitHubIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = GitHubIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.issues.issues_update(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.owner | string | Required within parent | |
path.repo | string | Required within parent | |
path.issue_number | integer | Required within parent | |
body | object | Optional | |
body.assignees | array | Optional | Usernames to assign to this issue. Pass one or more user logins to replace the set of assignees on this issue. Send an empty array (`[]`) to clear all assignees from the issue. Only users with push access can set assignees for new issues. Without push access to the repository, assignee changes are silently dropped. |
body.assignees[] | JSON | Each item | |
body.assignees[] (oneOf 1) | string | Alternative | |
body.assignees[] (oneOf 2) | object | Alternative | |
body.assignees[] (oneOf 2).confidence | string | Optional | The confidence level for this assignee choice. One of: low, medium, high |
body.assignees[] (oneOf 2).login | string | Optional | |
body.assignees[] (oneOf 2).rationale | string | Optional | Optional reasoning for selecting this assignee. |
body.assignees[] (oneOf 2).suggest | boolean | Optional | If `true`, the change is stored as a pending suggestion for human review rather than applied directly. |
body.body | JSON | Optional | |
body.body (anyOf 1) | string | Alternative | The contents of the issue. |
body.body (anyOf 2) | null | Alternative | |
body.duplicate_issue_id | integer | Optional | The ID of the issue that this issue duplicates, used when marking this issue as a duplicate with `status: Duplicate` or `state_reason: duplicate`. The issue must exist and be accessible to the authenticated user. |
body.issue_field_values | array | Optional | An array of issue field values to set on this issue. Each field value must include the field ID and the value to set. Only users with push access can set field values for issues |
body.issue_field_values[] | object | Each item | Additional keys: not allowed |
body.issue_field_values[].confidence | string | Optional | The confidence level for this field value choice. One of: low, medium, high |
body.issue_field_values[].field_id | integer | Required within parent | The ID of the issue field to set |
body.issue_field_values[].rationale | string | Optional | Optional reasoning for setting this field value. |
body.issue_field_values[].suggest | boolean | Optional | If `true`, the change is stored as a pending suggestion for human review rather than applied directly. |
body.issue_field_values[].value | JSON | Required within parent | The value to set for the field. For multi-select fields, provide an array of option names. |
body.issue_field_values[].value (oneOf 1) | string | Alternative | |
body.issue_field_values[].value (oneOf 2) | number | Alternative | |
body.issue_field_values[].value (oneOf 3) | array | Alternative | |
body.issue_field_values[].value (oneOf 3)[] | string | Each item | |
body.labels | array | Optional | Labels to associate with this issue. Pass one or more labels to replace the set of labels on this issue. Send an empty array (`[]`) to clear all labels from the issue. Only users with push access can set labels for issues. Without push access to the repository, label changes are silently dropped. |
body.labels[] | JSON | Each item | |
body.labels[] (oneOf 1) | string | Alternative | |
body.labels[] (oneOf 2) | object | Alternative | |
body.labels[] (oneOf 2).color | JSON | Optional | |
body.labels[] (oneOf 2).color (anyOf 1) | string | Alternative | |
body.labels[] (oneOf 2).color (anyOf 2) | null | Alternative | |
body.labels[] (oneOf 2).confidence | string | Optional | The confidence level for this label choice. One of: low, medium, high |
body.labels[] (oneOf 2).description | JSON | Optional | |
body.labels[] (oneOf 2).description (anyOf 1) | string | Alternative | |
body.labels[] (oneOf 2).description (anyOf 2) | null | Alternative | |
body.labels[] (oneOf 2).id | integer | Optional | |
body.labels[] (oneOf 2).name | string | Optional | |
body.labels[] (oneOf 2).rationale | string | Optional | Optional reasoning for selecting this label. |
body.labels[] (oneOf 2).suggest | boolean | Optional | If `true`, the change is stored as a pending suggestion for human review rather than applied directly. |
body.milestone | JSON | Optional | |
body.milestone (anyOf 1) | JSON | Alternative | |
body.milestone (anyOf 1) (oneOf 1) | string | Alternative | |
body.milestone (anyOf 1) (oneOf 2) | integer | Alternative | The `number` of the milestone to associate this issue with or use `null` to remove the current milestone. Only users with push access can set the milestone for issues. Without push access to the repository, milestone changes are silently dropped. |
body.milestone (anyOf 2) | null | Alternative | |
body.state | string | Optional | The open or closed state of the issue. One of: open, closed |
body.state_reason | JSON | Optional | |
body.state_reason (anyOf 1) | string | Alternative | The reason for the state change. Ignored unless `state` is changed. One of: completed, not_planned, duplicate, reopened |
body.state_reason (anyOf 2) | null | Alternative | |
body.title | JSON | Optional | |
body.title (anyOf 1) | JSON | Alternative | The title of the issue. |
body.title (anyOf 1) (oneOf 1) | string | Alternative | |
body.title (anyOf 1) (oneOf 2) | integer | Alternative | |
body.title (anyOf 2) | null | Alternative | |
body.type | JSON | Optional | |
body.type (anyOf 1) | JSON | Alternative | The issue type to associate with this issue. Only users with push access can set the type for issues. Without push access to the repository, type changes are silently dropped. |
body.type (anyOf 1) (oneOf 1) | string | Alternative | The name of the issue type. |
body.type (anyOf 1) (oneOf 2) | object | Alternative | The issue type with optional metadata. |
body.type (anyOf 1) (oneOf 2).confidence | string | Optional | The confidence level for this type choice. One of: low, medium, high |
body.type (anyOf 1) (oneOf 2).rationale | string | Optional | Optional reasoning for selecting this type. |
body.type (anyOf 1) (oneOf 2).suggest | boolean | Optional | If `true`, the change is stored as a pending suggestion for human review rather than applied directly. |
body.type (anyOf 1) (oneOf 2).value | JSON | Optional | |
body.type (anyOf 1) (oneOf 2).value (anyOf 1) | string | Alternative | The name of the issue type to associate with this issue, or `null` to remove the current issue type. |
body.type (anyOf 1) (oneOf 2).value (anyOf 2) | null | Alternative | |
body.type (anyOf 2) | null | Alternative |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (allOf 1) | Model | All variants apply | Expand Get an issue — response body |
$ (allOf 2) | object | All variants apply | |
$ (allOf 2).suggestions | object | Optional | Pending suggestions for each suggestible field (`type`, `issue_field_values`, `labels`, `assignees`, `state`) the request touched. Omitted for fields not in the request or with no pending or ignored suggestions. Items tagged `ignored` are echoes of the current request’s inputs that were not persisted as pending suggestions. |
$ (allOf 2).suggestions.assignees | array | Optional | |
$ (allOf 2).suggestions.assignees[] | object | Each item | |
$ (allOf 2).suggestions.assignees[].confidence | string | Optional | Known values: low, medium, high |
$ (allOf 2).suggestions.assignees[].ignored | boolean | Optional | |
$ (allOf 2).suggestions.assignees[].ignored_reason | string | Optional | Known values: already_applied, issue_already_closed |
$ (allOf 2).suggestions.assignees[].login | string | Optional | |
$ (allOf 2).suggestions.assignees[].rationale | string | Optional | |
$ (allOf 2).suggestions.assignees[].suggest | boolean | Optional | |
$ (allOf 2).suggestions.issue_field_values | array | Optional | |
$ (allOf 2).suggestions.issue_field_values[] | object | Each item | |
$ (allOf 2).suggestions.issue_field_values[].confidence | string | Optional | Known values: low, medium, high |
$ (allOf 2).suggestions.issue_field_values[].field_id | JSON | Optional | |
$ (allOf 2).suggestions.issue_field_values[].field_id (anyOf 1) | integer | Alternative | |
$ (allOf 2).suggestions.issue_field_values[].field_id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
$ (allOf 2).suggestions.issue_field_values[].ignored | boolean | Optional | |
$ (allOf 2).suggestions.issue_field_values[].ignored_reason | string | Optional | Known values: already_applied, issue_already_closed |
$ (allOf 2).suggestions.issue_field_values[].rationale | string | Optional | |
$ (allOf 2).suggestions.issue_field_values[].suggest | boolean | Optional | |
$ (allOf 2).suggestions.issue_field_values[].value | JSON | Optional | |
$ (allOf 2).suggestions.issue_field_values[].value (anyOf 1) | string | Alternative | |
$ (allOf 2).suggestions.issue_field_values[].value (anyOf 2) | JSON | Alternative | |
$ (allOf 2).suggestions.issue_field_values[].value (anyOf 2) (anyOf 1) | number | Alternative | |
$ (allOf 2).suggestions.issue_field_values[].value (anyOf 2) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
$ (allOf 2).suggestions.issue_field_values[].value (anyOf 3) | array | Alternative | |
$ (allOf 2).suggestions.issue_field_values[].value (anyOf 3)[] | string | Each item | |
$ (allOf 2).suggestions.labels | array | Optional | |
$ (allOf 2).suggestions.labels[] | object | Each item | |
$ (allOf 2).suggestions.labels[].confidence | string | Optional | Known values: low, medium, high |
$ (allOf 2).suggestions.labels[].ignored | boolean | Optional | |
$ (allOf 2).suggestions.labels[].ignored_reason | string | Optional | Known values: already_applied, issue_already_closed |
$ (allOf 2).suggestions.labels[].name | string | Optional | |
$ (allOf 2).suggestions.labels[].rationale | string | Optional | |
$ (allOf 2).suggestions.labels[].suggest | boolean | Optional | |
$ (allOf 2).suggestions.state | array | Optional | |
$ (allOf 2).suggestions.state[] | object | Each item | |
$ (allOf 2).suggestions.state[].confidence | string | Optional | Known values: low, medium, high |
$ (allOf 2).suggestions.state[].duplicate_issue_id | JSON | Optional | |
$ (allOf 2).suggestions.state[].duplicate_issue_id (anyOf 1) | integer | Alternative | |
$ (allOf 2).suggestions.state[].duplicate_issue_id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
$ (allOf 2).suggestions.state[].ignored | boolean | Optional | |
$ (allOf 2).suggestions.state[].ignored_reason | string | Optional | Known values: already_applied, issue_already_closed |
$ (allOf 2).suggestions.state[].rationale | string | Optional | |
$ (allOf 2).suggestions.state[].state_reason | string | Optional | |
$ (allOf 2).suggestions.state[].suggest | boolean | Optional | |
$ (allOf 2).suggestions.state[].value | string | Optional | |
$ (allOf 2).suggestions.type | array | Optional | |
$ (allOf 2).suggestions.type[] | object | Each item | |
$ (allOf 2).suggestions.type[].confidence | string | Optional | Known values: low, medium, high |
$ (allOf 2).suggestions.type[].ignored | boolean | Optional | |
$ (allOf 2).suggestions.type[].ignored_reason | string | Optional | Known values: already_applied, issue_already_closed |
$ (allOf 2).suggestions.type[].rationale | string | Optional | |
$ (allOf 2).suggestions.type[].suggest | boolean | Optional | |
$ (allOf 2).suggestions.type[].value | string | Optional |
Referenced models: Get an issue — response body
Schemas
Section titled “Schemas”16 more schemas are linked from the tables above, on the schema pages.
Get an issue — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. |
active_lock_reason | JSON | Optional | |
active_lock_reason (anyOf 1) | string | Alternative | |
active_lock_reason (anyOf 2) | null | Alternative | |
assignees | array | Optional | |
assignees[] | Model | Each item | Expand List users — response body — item |
author_association | string | Optional | How the author is associated with the repository. Known values: COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNER |
body | JSON | Optional | |
body (anyOf 1) | string | Alternative | Contents of the issue |
body (anyOf 2) | null | Alternative | |
body_html | string | Optional | |
body_text | string | Optional | |
closed_at | JSON | Required within parent | |
closed_at (anyOf 1) | string | Alternative | Format: date-time |
closed_at (anyOf 2) | null | Alternative | |
closed_by | Model | Optional | Expand Get an issue — response body — user |
comments | JSON | Required within parent | |
comments (anyOf 1) | integer | Alternative | |
comments (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
comments_url | string | Required within parent | Format: uri |
created_at | string | Required within parent | Format: date-time |
draft | boolean | Optional | |
events_url | string | Required within parent | Format: uri |
html_url | string | Required within parent | Format: uri |
id | JSON | Required within parent | |
id (anyOf 1) | integer | Alternative | Format: int64 |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
issue_dependencies_summary | Model | Optional | Expand Get an issue — response body — issue dependencies summary |
issue_field_values | array | Optional | |
issue_field_values[] | Model | Each item | Expand Add issue field values to an issue — response body — item |
labels | array | Required within parent | Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository |
labels[] | JSON | Each item | |
labels[] (anyOf 1) | string | Alternative | |
labels[] (anyOf 2) | Model | Alternative | Expand Get an issue — response body — labels item archived by, color, default, description, id, name, node id, url |
labels_url | string | Required within parent | |
locked | boolean | Required within parent | |
milestone | Model | Required within parent | Expand Get an issue — response body — milestone |
node_id | string | Required within parent | |
number | JSON | Required within parent | |
number (anyOf 1) | integer | Alternative | Number uniquely identifying the issue within its repository |
number (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
parent_issue_url | JSON | Optional | |
parent_issue_url (anyOf 1) | string | Alternative | URL to get the parent issue of this issue, if it is a sub-issue Format: uri |
parent_issue_url (anyOf 2) | null | Alternative | |
performed_via_github_app | Model | Optional | Expand Get an app — response body |
pinned_comment | Model | Optional | Expand Get an issue — response body — pinned comment |
pull_request | object | Optional | |
pull_request.diff_url | string | Required within parent | Format: uri |
pull_request.html_url | string | Required within parent | Format: uri |
pull_request.merged_at | string | Optional | Format: date-time |
pull_request.patch_url | string | Required within parent | Format: uri |
pull_request.url | string | Required within parent | Format: uri |
reactions | Model | Optional | Expand Get an issue — response body — reactions |
repository | Model | Optional | Expand List repositories for the authenticated user — response body — item |
repository_url | string | Required within parent | Format: uri |
state | string | Required within parent | State of the issue; either 'open' or 'closed' |
state_reason | JSON | Optional | |
state_reason (anyOf 1) | string | Alternative | The reason for the current state Known values: completed, reopened, not_planned, duplicate |
state_reason (anyOf 2) | null | Alternative | |
sub_issues_summary | Model | Optional | Expand Get an issue — response body — sub issues summary |
timeline_url | string | Optional | Format: uri |
title | string | Required within parent | Title of the issue |
type | Model | Optional | Expand Create issue type for an organization — response body |
updated_at | string | Required within parent | Format: date-time |
url | string | Required within parent | URL for the issue Format: uri |
user | Model | Required within parent | Expand Get an issue — response body — user |
Referenced models: Get an app — response body, Get an issue — response body — issue dependencies summary, Add issue field values to an issue — response body — item, Create issue type for an organization — response body, Get an issue — response body — pinned comment, Get an issue — response body — milestone, Get an issue — response body — user, Get an issue — response body — reactions, List repositories for the authenticated user — response body — item, List users — response body — item, Get an issue — response body — sub issues summary, Get an issue — response body — labels item archived by, color, default, description, id, name, node id, url
Get an issue — response body — issue dependencies summary
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
blocked_by | JSON | Required within parent | |
blocked_by (anyOf 1) | integer | Alternative | |
blocked_by (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
blocking | JSON | Required within parent | |
blocking (anyOf 1) | integer | Alternative | |
blocking (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
total_blocked_by | JSON | Required within parent | |
total_blocked_by (anyOf 1) | integer | Alternative | |
total_blocked_by (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
total_blocking | JSON | Required within parent | |
total_blocking (anyOf 1) | integer | Alternative | |
total_blocking (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Get an issue — response body — pinned comment
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | Model | Alternative | Expand Get an issue — response body — pinned comment author association, body, body html, body text, created at, html url, id, issue url, minimized, node id, performed via github app, pin, reactions, updated at, url, user |
$ (anyOf 2) | null | Alternative |
Get an issue — response body — milestone
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | Model | Alternative | Expand Get an issue — response body — milestone / state: open, closed |
$ (anyOf 2) | null | Alternative |
Referenced models: Get an issue — response body — milestone / state: open, closed
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: github.issues_update. Catalog operation: issues/update. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Pinned headers: {"X-GitHub-Api-Version": "2026-03-10", "User-Agent": "Alter", "Accept": "application/vnd.github+json"}