Skip to content

GitHub: Pin an issue comment

GitHub issues.issuesPinComment: arguments, response, policy and SDK examples.

← Issues operations · Get started

Operation github.issues_pin_comment

Provider route: PUT /repos/{owner}/{repo}/issues/comments/{comment_id}/pin. Alter supplies the connection’s credentials and routing.

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"]["issuesPinComment"]>[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.issuesPinComment(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from 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_pin_comment(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.ownerstringRequired within parent
path.repostringRequired within parent
path.comment_idintegerRequired within parentFormat: int64

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Get an issue comment — response body

Referenced models: Get an issue comment — response body

3 more schemas are linked from the tables above, on the schema pages.

Get an issue comment — response body
FieldTypePresenceDescription and constraints
$objectRootComments provide a way for people to collaborate on an issue.
author_associationstringOptionalHow the author is associated with the repository.
Known values: COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNER
bodystringOptionalContents of the issue comment
body_htmlstringOptional
body_textstringOptional
created_atstringRequired within parentFormat: date-time
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeUnique identifier of the issue comment
Format: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
issue_urlstringRequired within parentFormat: uri
minimizedModelOptionalExpand Get an issue comment — response body — minimized
node_idstringRequired within parent
performed_via_github_appModelOptionalExpand Get an app — response body
pinModelOptionalExpand Get an issue comment — response body — pin
reactionsModelOptionalExpand Get an issue — response body — reactions
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parentURL for the issue comment
Format: uri
userModelRequired within parentExpand Get an issue — response body — user

Referenced models: Get an app — response body, Get an issue comment — response body — minimized, Get an issue comment — response body — pin, Get an issue — response body — user, Get an issue — response body — reactions

Get an app — response body
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternativeGitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.
$ (anyOf 1).client_idstringOptional
$ (anyOf 1).created_atstringRequired within parentFormat: date-time
$ (anyOf 1).descriptionJSONRequired within parent
$ (anyOf 1).description (anyOf 1)stringAlternative
$ (anyOf 1).description (anyOf 2)nullAlternative
$ (anyOf 1).eventsarrayRequired within parentThe list of events for the GitHub app. Note that the `installation_target`, `security_advisory`, and `meta` events are not included because they are global events and not specific to an installation.
$ (anyOf 1).events[]stringEach item
$ (anyOf 1).external_urlstringRequired within parentFormat: uri
$ (anyOf 1).html_urlstringRequired within parentFormat: uri
$ (anyOf 1).idJSONRequired within parent
$ (anyOf 1).id (anyOf 1)integerAlternativeUnique identifier of the GitHub app
$ (anyOf 1).id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 1).installations_countJSONOptional
$ (anyOf 1).installations_count (anyOf 1)integerAlternativeThe number of installations associated with the GitHub app. Only returned when the integration is requesting details about itself.
$ (anyOf 1).installations_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 1).namestringRequired within parentThe name of the GitHub app
$ (anyOf 1).node_idstringRequired within parent
$ (anyOf 1).ownerJSONRequired within parent
$ (anyOf 1).owner (anyOf 1)ModelAlternativeExpand List users — response body — item
$ (anyOf 1).owner (anyOf 2)ModelAlternativeExpand Get an app — response body — client id, created at, description, events, external url, html url, id, installations count, name, node id, owner, permissions, slug, updated at owner Enterprise
$ (anyOf 1).permissionsobjectRequired within parentThe set of permissions for the GitHub app
Additional keys: see wildcard field
$ (anyOf 1).permissions.checksstringOptional
$ (anyOf 1).permissions.contentsstringOptional
$ (anyOf 1).permissions.deploymentsstringOptional
$ (anyOf 1).permissions.issuesstringOptional
$ (anyOf 1).permissions.metadatastringOptional
$ (anyOf 1).permissions.*stringAdditional keys
$ (anyOf 1).slugstringOptionalThe slug name of the GitHub app
$ (anyOf 1).updated_atstringRequired within parentFormat: date-time
$ (anyOf 2)nullAlternative

Referenced models: Get an app — response body — client id, created at, description, events, external url, html url, id, installations count, name, node id, owner, permissions, slug, updated at owner Enterprise, List users — response body — item

Get an issue comment — response body — minimized
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternativeDetails about why an issue comment was minimized.
$ (anyOf 1).reasonJSONRequired within parent
$ (anyOf 1).reason (anyOf 1)stringAlternativeThe reason the comment was minimized.
$ (anyOf 1).reason (anyOf 2)nullAlternative
$ (anyOf 2)nullAlternative
Get an issue comment — response body — pin
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternativeContext around who pinned an issue comment and when it was pinned.
$ (anyOf 1).pinned_atstringRequired within parentFormat: date-time
$ (anyOf 1).pinned_byModelRequired within parentExpand Get an issue — response body — user
$ (anyOf 2)nullAlternative

Referenced models: Get an issue — response body — user

Get an issue — response body — user
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Get an issue — response body — user A Git Hub user
$ (anyOf 2)nullAlternative

Referenced models: Get an issue — response body — user A Git Hub user

Get an app — response body — client id, created at, description, events, external url, html url, id, installations count, name, node id, owner, permissions, slug, updated at owner Enterprise
FieldTypePresenceDescription and constraints
$objectRootAn enterprise on GitHub.
avatar_urlstringRequired within parentFormat: uri
created_atJSONRequired within parent
created_at (anyOf 1)stringAlternativeFormat: date-time
created_at (anyOf 2)nullAlternative
descriptionJSONOptional
description (anyOf 1)stringAlternativeA short description of the enterprise.
description (anyOf 2)nullAlternative
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeUnique identifier of the enterprise
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringRequired within parentThe name of the enterprise.
node_idstringRequired within parent
slugstringRequired within parentThe slug url identifier for the enterprise.
updated_atJSONRequired within parent
updated_at (anyOf 1)stringAlternativeFormat: date-time
updated_at (anyOf 2)nullAlternative
website_urlJSONOptional
website_url (anyOf 1)stringAlternativeThe enterprise's website URL.
Format: uri
website_url (anyOf 2)nullAlternative

SDK function policy ID: github.issues_pin_comment. Catalog operation: issues/pin-comment. 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"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.