Skip to content

GitHub: Get the latest release

GitHub repos.reposGetLatestRelease: arguments, response, policy and SDK examples.

← Repos operations · Get started

Operation github.repos_get_latest_release

Provider route: GET /repos/{owner}/{repo}/releases/latest. 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["repos"]["reposGetLatestRelease"]>[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.repos.reposGetLatestRelease(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.repos.repos_get_latest_release(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

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

FieldTypePresenceDescription and constraints
$ModelRootExpand Get a release — response body

Referenced models: Get a release — response body

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

Get a release — response body
FieldTypePresenceDescription and constraints
$objectRootA release.
assetsarrayRequired within parent
assets[]ModelEach itemExpand Get a release asset — response body
assets_urlstringRequired within parentFormat: uri
authorModelRequired within parentExpand List users — response body — item
bodyJSONOptional
body (anyOf 1)stringAlternative
body (anyOf 2)nullAlternative
body_htmlstringOptional
body_textstringOptional
created_atstringRequired within parentFormat: date-time
discussion_urlstringOptionalThe URL of the release discussion.
Format: uri
draftbooleanRequired within parenttrue to create a draft (unpublished) release, false to create a published one.
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternative
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
immutablebooleanOptionalWhether or not the release is immutable.
mentions_countJSONOptional
mentions_count (anyOf 1)integerAlternative
mentions_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
nameJSONRequired within parent
name (anyOf 1)stringAlternative
name (anyOf 2)nullAlternative
node_idstringRequired within parent
prereleasebooleanRequired within parentWhether to identify the release as a prerelease or a full release.
published_atJSONRequired within parent
published_at (anyOf 1)stringAlternativeFormat: date-time
published_at (anyOf 2)nullAlternative
reactionsModelOptionalExpand Get an issue — response body — reactions
tag_namestringRequired within parentThe name of the tag.
tarball_urlJSONRequired within parent
tarball_url (anyOf 1)stringAlternativeFormat: uri
tarball_url (anyOf 2)nullAlternative
target_commitishstringRequired within parentSpecifies the commitish value that determines where the Git tag is created from.
updated_atJSONOptional
updated_at (anyOf 1)stringAlternativeFormat: date-time
updated_at (anyOf 2)nullAlternative
upload_urlstringRequired within parent
urlstringRequired within parentFormat: uri
zipball_urlJSONRequired within parent
zipball_url (anyOf 1)stringAlternativeFormat: uri
zipball_url (anyOf 2)nullAlternative

Referenced models: Get an issue — response body — reactions, Get a release asset — response body, List users — response body — item

Get an issue — response body — reactions
FieldTypePresenceDescription and constraints
$objectRoot
+1JSONRequired within parent
+1 (anyOf 1)integerAlternative
+1 (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
-1JSONRequired within parent
-1 (anyOf 1)integerAlternative
-1 (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
confusedJSONRequired within parent
confused (anyOf 1)integerAlternative
confused (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
eyesJSONRequired within parent
eyes (anyOf 1)integerAlternative
eyes (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
heartJSONRequired within parent
heart (anyOf 1)integerAlternative
heart (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
hoorayJSONRequired within parent
hooray (anyOf 1)integerAlternative
hooray (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
laughJSONRequired within parent
laugh (anyOf 1)integerAlternative
laugh (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
rocketJSONRequired within parent
rocket (anyOf 1)integerAlternative
rocket (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
total_countJSONRequired within parent
total_count (anyOf 1)integerAlternative
total_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
urlstringRequired within parentFormat: uri
Get a release asset — response body
FieldTypePresenceDescription and constraints
$objectRootData related to a release.
browser_download_urlstringRequired within parentFormat: uri
content_typestringRequired within parent
created_atstringRequired within parentFormat: date-time
digestJSONRequired within parent
digest (anyOf 1)stringAlternative
digest (anyOf 2)nullAlternative
download_countJSONRequired within parent
download_count (anyOf 1)integerAlternative
download_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
idJSONRequired within parent
id (anyOf 1)integerAlternative
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
labelJSONRequired within parent
label (anyOf 1)stringAlternative
label (anyOf 2)nullAlternative
namestringRequired within parentThe file name of the asset.
node_idstringRequired within parent
sizeJSONRequired within parent
size (anyOf 1)integerAlternative
size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
statestringRequired within parentState of the release asset.
Known values: uploaded, open
updated_atstringRequired within parentFormat: date-time
uploaderModelRequired within parentExpand Get an issue — response body — user
urlstringRequired within parentFormat: uri

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

SDK function policy ID: github.repos_get_latest_release. Catalog operation: repos/get-latest-release. 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.