GitHub: Get an automation revision
GitHub agentAutomations.agentAutomationsGetAutomationRevision: arguments, response, policy and SDK examples.
← Agent automations operations · Get started
Operation github.agent_automations_get_automation_revision
Provider route: GET /agents/repos/{owner}/{repo}/automations/{automation_id}/revisions/{revision_id}. 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["agentAutomations"]["agentAutomationsGetAutomationRevision"]>[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.agentAutomationsGetAutomationRevision(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.agent_automations.agent_automations_get_automation_revision(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.automation_id | string | Required within parent | |
path.revision_id | string | Required within parent |
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 |
|---|---|---|---|
$ | object | Root | An 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_id | string | Required within parent | The automation this revision belongs to. |
change_type | string | Required within parent | The kind of change recorded by the revision. Known values: created, edited, enabled, disabled, deleted, rolled_back, unknown |
changed_at | string | Required within parent | When the change was applied. Format: date-time |
creator | JSON | Optional | The automation’s original creator. Omitted when not recorded. |
creator (allOf 1) | object | All variants apply | A GitHub user |
creator (allOf 1).id | JSON | Optional | |
creator (allOf 1).id (anyOf 1) | integer | Alternative | The unique identifier of the user Format: int64 |
creator (allOf 1).id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
editor | JSON | Optional | The person who made this change. Omitted for system changes and legacy records. |
editor (allOf 1) | object | All variants apply | A GitHub user |
editor (allOf 1).id | JSON | Optional | |
editor (allOf 1).id (anyOf 1) | integer | Alternative | The unique identifier of the user Format: int64 |
editor (allOf 1).id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
editor_type | string | Optional | The kind of actor that made the change. Known values: user, system, unknown |
id | string | Required within parent | The unique identifier of this revision. |
restored_from_revision_id | string | Optional | The revision a rollback restored. Present only when `change_type` is `rolled_back`. |
revision_number | JSON | Required within parent | |
revision_number (anyOf 1) | integer | Alternative | Position of this revision in the automation’s history, starting at 1. Format: int64 |
revision_number (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
snapshot | Model | Optional | Expand Get an automation revision — response body — snapshot |
Referenced models: Get an automation revision — response body — snapshot
Schemas
Section titled “Schemas”16 more schemas are linked from the tables above, on the schema pages.
Get an automation revision — response body — snapshot
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The 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_at | string | Required within parent | When the automation was created. Format: date-time |
created_by | object | Required within parent | A GitHub user |
created_by.id | JSON | Optional | |
created_by.id (anyOf 1) | integer | Alternative | The unique identifier of the user Format: int64 |
created_by.id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
enabled | boolean | Optional | Whether the automation was enabled when this configuration was saved. |
id | string | Required within parent | The unique identifier of the automation. |
model | string | Optional | The model override for sessions triggered by this automation. Absent when the platform selects the model. |
name | string | Required within parent | The name of the automation. |
prompt | string | Required within parent | The prompt for the automation. |
reasoning_effort | string | Optional | The reasoning effort override for sessions triggered by this automation. Absent when the model's default is used. |
require_actor_write_permission | boolean | Optional | When 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 |
tools | array | Optional | The tools available to the automation. |
tools[] | string | Each item | |
triggers | Model | Optional | Expand Get an automation — response body — triggers |
type | string | Optional | The 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_at | string | Required within parent | When the automation was last updated. Format: date-time |
Referenced models: Get an automation — response body — triggers
Get an automation — response body — triggers
Referenced models: Get an automation — response body — triggers automation completed, Get an automation — response body — triggers automation failed, Get an automation — response body — triggers dependabot alert, Get an automation — response body — triggers discussion comment, Get an automation — response body — triggers discussion opened, Get an automation — response body — triggers interval, Get an automation — response body — triggers issue assigned, Get an automation — response body — triggers issue closed, Get an automation — response body — triggers issue comment, Get an automation — response body — triggers issue labeled, Get an automation — response body — triggers pull request assigned, Get an automation — response body — triggers pull request closed, Get an automation — response body — triggers pull request comment, Get an automation — response body — triggers pull request labeled, Get an automation — response body — triggers pull request review submitted, Get an automation — response body — triggers workflow run
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: github.agent_automations_get_automation_revision. Catalog operation: agent-automations/get-automation-revision. 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"}