Skip to content

GitHub: List revisions for an automation

GitHub agentAutomations.agentAutomationsListAutomationRevisions: arguments, response, policy and SDK examples.

← Agent automations operations · Get started

Operation github.agent_automations_list_automation_revisions

Provider route: GET /agents/repos/{owner}/{repo}/automations/{automation_id}/revisions. 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["agentAutomations"]["agentAutomationsListAutomationRevisions"]>[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.agentAutomations.agentAutomationsListAutomationRevisions(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.agent_automations.agent_automations_list_automation_revisions(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.automation_idstringRequired within parent
queryobjectOptionalAdditional keys: not allowed
query.cursorstringOptional
query.per_pageintegerOptionalDefault: 30
Maximum: 100
Minimum: 1

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

FieldTypePresenceDescription and constraints
$objectRootA page of an automation’s revision history, newest first.
revisionsarrayRequired within parentRevisions ordered by revision number descending.
revisions[]ModelEach itemExpand List revisions for an automation — response body — revisions item

Referenced models: List revisions for an automation — response body — revisions item

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

List revisions for an automation — response body — revisions item
FieldTypePresenceDescription and constraints
$objectRootAn immutable snapshot of an automation's public definition after one
configuration save, with the attribution needed to understand who made the change.
Legacy history may also contain lifecycle-only snapshots.
automation_idstringRequired within parentThe automation this revision belongs to.
change_typestringRequired within parentThe kind of change recorded by the revision.
Known values: created, edited, enabled, disabled, deleted, rolled_back, unknown
changed_atstringRequired within parentWhen the change was applied.
Format: date-time
creatorJSONOptionalThe automation's original creator. Omitted when not recorded.
creator (allOf 1)objectAll variants applyA GitHub user
creator (allOf 1).idJSONOptional
creator (allOf 1).id (anyOf 1)integerAlternativeThe unique identifier of the user
Format: int64
creator (allOf 1).id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
editorJSONOptionalThe person who made this change. Omitted for system changes and legacy records.
editor (allOf 1)objectAll variants applyA GitHub user
editor (allOf 1).idJSONOptional
editor (allOf 1).id (anyOf 1)integerAlternativeThe unique identifier of the user
Format: int64
editor (allOf 1).id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
editor_typestringOptionalThe kind of actor that made the change.
Known values: user, system, unknown
idstringRequired within parentThe unique identifier of this revision.
restored_from_revision_idstringOptionalThe revision a rollback restored. Present only when `change_type` is `rolled_back`.
revision_numberJSONRequired within parent
revision_number (anyOf 1)integerAlternativePosition of this revision in the automation's history, starting at 1.
Format: int64
revision_number (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
snapshotModelOptionalExpand Get an automation revision — response body — snapshot

Referenced models: Get an automation revision — response body — snapshot

Get an automation revision — response body — snapshot
FieldTypePresenceDescription and constraints
$objectRootThe automation's public detail representation after the change,
including its enabled state at configuration-save time, not its current
lifecycle state. Legacy deleted revisions are identified by `change_type`.

Additional keys: not allowed
created_atstringRequired within parentWhen the automation was created.
Format: date-time
created_byobjectRequired within parentA GitHub user
created_by.idJSONOptional
created_by.id (anyOf 1)integerAlternativeThe unique identifier of the user
Format: int64
created_by.id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
enabledbooleanOptionalWhether the automation was enabled when this configuration was saved.
idstringRequired within parentThe unique identifier of the automation.
modelstringOptionalThe model override for sessions triggered by this automation. Absent when the platform selects the model.
namestringRequired within parentThe name of the automation.
promptstringRequired within parentThe prompt for the automation.
reasoning_effortstringOptionalThe reasoning effort override for sessions triggered by this automation. Absent when the model's default is used.
require_actor_write_permissionbooleanOptionalWhen true, event-triggered runs require the event actor to have repo write permission, even when the org's allow_read_access_triggers policy is enabled. Does not apply to interval-scheduled runs, which always run as the automation owner.
Default: false
toolsarrayOptionalThe tools available to the automation.
tools[]stringEach item
triggersModelOptionalExpand Get an automation — response body — triggers
typestringOptionalThe type of automation. `personal` keeps it private to its creator and its runs act as that user. `shared` makes it belong to the repository, visible to anyone with read access to the repository, and its runs act as the Copilot app rather than as a person.
Known values: personal, shared
Read only: true
updated_atstringRequired within parentWhen the automation was last updated.
Format: date-time

Referenced models: Get an automation — response body — triggers

Get an automation — response body — triggers automation completed
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
allow_copilot_triggersbooleanOptionalWhen true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422.
automation_idsarrayRequired within parentUpstream Automation IDs in the same repository.
Maximum items: 3
Minimum items: 1
Unique items: true
automation_ids[]stringEach item
write_scopestringOptionalSets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default `trigger`). Organization or repository policy may restrict the effective scope to `trigger`. Explicitly setting `repository` on create or edit returns 422 when policy validation is enabled and that policy applies.
Known values: trigger, repository
Get an automation — response body — triggers automation failed
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
allow_copilot_triggersbooleanOptionalWhen true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422.
automation_idsarrayRequired within parentUpstream Automation IDs in the same repository. An Automation cannot list itself, and a user-owned Automation can only be listed by its creator's user-owned Automations.
Maximum items: 3
Minimum items: 1
Unique items: true
automation_ids[]stringEach item
reasonsarrayOptionalFailure reasons to match. Omit to match only reported failures.
Maximum items: 3
Minimum items: 1
Unique items: true
reasons[]stringEach itemKnown values: reported, crashed, timed_out
write_scopestringOptionalSets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default `trigger`). Organization or repository policy may restrict the effective scope to `trigger`. Explicitly setting `repository` on create or edit returns 422 when policy validation is enabled and that policy applies.
Known values: trigger, repository
Get an automation — response body — triggers dependabot alert
FieldTypePresenceDescription and constraints
$objectRootRuns on the default branch when a security alert of this kind is created in the repository. These are system events without an issue, pull request, or human actor, and cannot be run manually.
Additional keys: not allowed
allow_copilot_triggersbooleanOptionalWhen true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422.
write_scopestringOptionalSets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default `trigger`). Organization or repository policy may restrict the effective scope to `trigger`. Explicitly setting `repository` on create or edit returns 422 when policy validation is enabled and that policy applies.
Known values: trigger, repository
Get an automation — response body — triggers discussion comment
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
allow_copilot_triggersbooleanOptionalWhen true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422.
body_substringstringOptionalA case-insensitive substring matched against the event body.
categoriesarrayOptionalDiscussion category names matched case-insensitively.
Minimum items: 1
Unique items: true
categories[]stringEach item
comment_typesarrayOptionalTop-level discussion comments and replies to match. Omit to match both.
Maximum items: 2
Minimum items: 1
Unique items: true
comment_types[]stringEach itemKnown values: comment, reply
write_scopestringOptionalSets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default `trigger`). Organization or repository policy may restrict the effective scope to `trigger`. Explicitly setting `repository` on create or edit returns 422 when policy validation is enabled and that policy applies.
Known values: trigger, repository
Get an automation — response body — triggers issue closed
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
allow_copilot_triggersbooleanOptionalWhen true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422.
querystringOptionalA GitHub issue or pull request search query.
Minimum length: 1
write_scopestringOptionalSets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default `trigger`). Organization or repository policy may restrict the effective scope to `trigger`. Explicitly setting `repository` on create or edit returns 422 when policy validation is enabled and that policy applies.
Known values: trigger, repository

SDK function policy ID: github.agent_automations_list_automation_revisions. Catalog operation: agent-automations/list-automation-revisions. 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.