Skip to content

GitHub: Agent automations schemas

36 GitHub schemas with complete fields and constraints.

← Agent automations operations · All schemas

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

FieldTypePresenceDescription and constraints
$objectRootTrigger configuration for the automation.
Additional keys: not allowed
automation_completedModelOptionalExpand Get an automation — response body — triggers automation completed
automation_failedModelOptionalExpand Get an automation — response body — triggers automation failed
code_scanning_alertModelOptionalExpand Get an automation — response body — triggers dependabot alert
dependabot_alertModelOptionalExpand Get an automation — response body — triggers dependabot alert
discussion_commentModelOptionalExpand Get an automation — response body — triggers discussion comment
discussion_openedModelOptionalExpand Get an automation — response body — triggers discussion opened
discussion_updatedModelOptionalExpand Get an automation — response body — triggers discussion opened
intervalModelOptionalExpand Get an automation — response body — triggers interval
issue_assignedModelOptionalExpand Get an automation — response body — triggers issue assigned
issue_closedModelOptionalExpand Get an automation — response body — triggers issue closed
issue_commentModelOptionalExpand Get an automation — response body — triggers issue comment
issue_labeledModelOptionalExpand Get an automation — response body — triggers issue labeled
issue_openedModelOptionalExpand Get an automation — response body — triggers issue closed
issue_reopenedModelOptionalExpand Get an automation — response body — triggers issue closed
pull_request_assignedModelOptionalExpand Get an automation — response body — triggers pull request assigned
pull_request_closedModelOptionalExpand Get an automation — response body — triggers pull request closed
pull_request_commentModelOptionalExpand Get an automation — response body — triggers pull request comment
pull_request_converted_to_draftModelOptionalExpand Get an automation — response body — triggers pull request closed
pull_request_labeledModelOptionalExpand Get an automation — response body — triggers pull request labeled
pull_request_merge_conflictModelOptionalExpand Get an automation — response body — triggers pull request closed
pull_request_mergedModelOptionalExpand Get an automation — response body — triggers pull request closed
pull_request_openedModelOptionalExpand Get an automation — response body — triggers pull request closed
pull_request_ready_for_reviewModelOptionalExpand Get an automation — response body — triggers pull request closed
pull_request_reopenedModelOptionalExpand Get an automation — response body — triggers pull request closed
pull_request_review_dismissedModelOptionalExpand Get an automation — response body — triggers pull request closed
pull_request_review_requestedModelOptionalExpand Get an automation — response body — triggers pull request closed
pull_request_review_submittedModelOptionalExpand Get an automation — response body — triggers pull request review submitted
pull_request_review_thread_resolvedModelOptionalExpand Get an automation — response body — triggers pull request closed
pull_request_review_thread_unresolvedModelOptionalExpand Get an automation — response body — triggers pull request closed
pull_request_synchronizeModelOptionalExpand Get an automation — response body — triggers pull request closed
secret_scanning_alertModelOptionalExpand Get an automation — response body — triggers dependabot alert
sub_issue_addedModelOptionalExpand Get an automation — response body — triggers issue closed
workflow_runModelOptionalExpand Get an automation — response body — triggers workflow run

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

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 discussion opened

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
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 interval

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.
cadencearrayRequired within parentOne or more schedules on which the Automation runs.
Minimum items: 1
Unique items: true
cadence[]stringEach itemKnown values: hourly, daily, weekly
day_of_weekJSONOptional
day_of_week (anyOf 1)integerAlternativeUTC weekday anchor for weekly schedules, where `0` is Sunday and `6` is Saturday. Omitted weekly values default to Monday (`1`).
Maximum: 6
Minimum: 0
day_of_week (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
hour_utcJSONOptional
hour_utc (anyOf 1)integerAlternativeUTC hour anchor (0 through 23) for daily and weekly schedules. Omitted daily and weekly values default to `0` (midnight UTC).
Maximum: 23
Minimum: 0
hour_utc (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
minute_utcJSONOptional
minute_utc (anyOf 1)integerAlternativeUTC minute anchor for daily and weekly schedules. Omitted daily and weekly values default to `0`. Must be omitted whenever `cadence` includes `hourly`.
Known values: 0, 15, 30, 45
Default: 0
minute_utc (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
write_scopestringOptionalHas no effect: scheduled runs can change any resource in the repository, and an organization or repository policy requiring trigger-scoped writes does not apply to them.
Known values: trigger, repository

Get an automation — response body — triggers issue assigned

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.
assigneesarrayOptionalAffected assignee logins matched case-insensitively.
Minimum items: 1
Unique items: true
assignees[]stringEach item
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

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

Get an automation — response body — triggers issue 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.
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

Get an automation — response body — triggers issue labeled

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.
labelsarrayOptionalLabel names matched case-insensitively against the label added by the event. Omit or use an empty array to match every added label.
Unique items: true
labels[]stringEach item
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

Get an automation — response body — triggers pull request assigned

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.
assigneesarrayOptionalAffected assignee logins matched case-insensitively.
Minimum items: 1
Unique items: true
assignees[]stringEach item
pathsarrayOptionalGitignore-style changed-file path globs.
Minimum items: 1
paths[]stringEach itemMinimum length: 1
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

Get an automation — response body — triggers pull request 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.
pathsarrayOptionalGitignore-style changed-file path globs.
Minimum items: 1
paths[]stringEach itemMinimum length: 1
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

Get an automation — response body — triggers pull request 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.
comment_typesarrayRequired within parentPull request conversation and inline review comment types to match.
Maximum items: 2
Minimum items: 1
Unique items: true
comment_types[]stringEach itemKnown values: timeline_comment, review_comment
pathsarrayOptionalGitignore-style changed-file path globs.
Minimum items: 1
paths[]stringEach itemMinimum length: 1
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

Get an automation — response body — triggers pull request labeled

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.
labelsarrayOptionalLabel names matched case-insensitively against the label added by the event. Omit or use an empty array to match every added label.
Unique items: true
labels[]stringEach item
pathsarrayOptionalGitignore-style changed-file path globs.
Minimum items: 1
paths[]stringEach itemMinimum length: 1
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

Get an automation — response body — triggers pull request review submitted

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.
pathsarrayOptionalGitignore-style changed-file path globs.
Minimum items: 1
paths[]stringEach itemMinimum length: 1
querystringOptionalA GitHub issue or pull request search query.
Minimum length: 1
statesarrayRequired within parentSubmitted review states to match.
Maximum items: 3
Minimum items: 1
Unique items: true
states[]stringEach itemKnown values: approved, changes_requested, commented
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 workflow run

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.
conclusionsarrayRequired within parentWorkflow conclusions to match. The current trigger supports failure.
Maximum items: 1
Minimum items: 1
conclusions[]stringEach itemKnown values: failure
querystringOptionalA GitHub issue or pull request search query.
Minimum length: 1
workflowsarrayRequired within parentWorkflow names matched against the name in each workflow YAML file.
Minimum items: 1
workflows[]stringEach itemMinimum 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

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

Update an automation — request body — body triggers

FieldTypePresenceDescription and constraints
$objectRootTrigger configuration for the automation.
Additional keys: not allowed
automation_completedModelOptionalExpand Update an automation — request body — body triggers automation completed
automation_failedModelOptionalExpand Update an automation — request body — body triggers automation failed
code_scanning_alertModelOptionalExpand Update an automation — request body — body triggers dependabot alert
dependabot_alertModelOptionalExpand Update an automation — request body — body triggers dependabot alert
discussion_commentModelOptionalExpand Update an automation — request body — body triggers discussion comment
discussion_openedModelOptionalExpand Update an automation — request body — body triggers discussion opened
discussion_updatedModelOptionalExpand Update an automation — request body — body triggers discussion opened
intervalModelOptionalExpand Update an automation — request body — body triggers interval
issue_assignedModelOptionalExpand Update an automation — request body — body triggers issue assigned
issue_closedModelOptionalExpand Update an automation — request body — body triggers issue closed
issue_commentModelOptionalExpand Update an automation — request body — body triggers issue comment
issue_labeledModelOptionalExpand Update an automation — request body — body triggers issue labeled
issue_openedModelOptionalExpand Update an automation — request body — body triggers issue closed
issue_reopenedModelOptionalExpand Update an automation — request body — body triggers issue closed
pull_request_assignedModelOptionalExpand Update an automation — request body — body triggers pull request assigned
pull_request_closedModelOptionalExpand Update an automation — request body — body triggers pull request closed
pull_request_commentModelOptionalExpand Update an automation — request body — body triggers pull request comment
pull_request_converted_to_draftModelOptionalExpand Update an automation — request body — body triggers pull request closed
pull_request_labeledModelOptionalExpand Update an automation — request body — body triggers pull request labeled
pull_request_merge_conflictModelOptionalExpand Update an automation — request body — body triggers pull request closed
pull_request_mergedModelOptionalExpand Update an automation — request body — body triggers pull request closed
pull_request_openedModelOptionalExpand Update an automation — request body — body triggers pull request closed
pull_request_ready_for_reviewModelOptionalExpand Update an automation — request body — body triggers pull request closed
pull_request_reopenedModelOptionalExpand Update an automation — request body — body triggers pull request closed
pull_request_review_dismissedModelOptionalExpand Update an automation — request body — body triggers pull request closed
pull_request_review_requestedModelOptionalExpand Update an automation — request body — body triggers pull request closed
pull_request_review_submittedModelOptionalExpand Update an automation — request body — body triggers pull request review submitted
pull_request_review_thread_resolvedModelOptionalExpand Update an automation — request body — body triggers pull request closed
pull_request_review_thread_unresolvedModelOptionalExpand Update an automation — request body — body triggers pull request closed
pull_request_synchronizeModelOptionalExpand Update an automation — request body — body triggers pull request closed
secret_scanning_alertModelOptionalExpand Update an automation — request body — body triggers dependabot alert
sub_issue_addedModelOptionalExpand Update an automation — request body — body triggers issue closed
workflow_runModelOptionalExpand Update an automation — request body — body triggers workflow run

Referenced models: Update an automation — request body — body triggers automation completed, Update an automation — request body — body triggers automation failed, Update an automation — request body — body triggers dependabot alert, Update an automation — request body — body triggers discussion comment, Update an automation — request body — body triggers discussion opened, Update an automation — request body — body triggers interval, Update an automation — request body — body triggers issue assigned, Update an automation — request body — body triggers issue closed, Update an automation — request body — body triggers issue comment, Update an automation — request body — body triggers issue labeled, Update an automation — request body — body triggers pull request assigned, Update an automation — request body — body triggers pull request closed, Update an automation — request body — body triggers pull request comment, Update an automation — request body — body triggers pull request labeled, Update an automation — request body — body triggers pull request review submitted, Update an automation — request body — body triggers workflow run

Update an automation — request body — 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.
One of: trigger, repository

Update an automation — request body — 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 itemOne of: 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.
One of: trigger, repository

Update an automation — request body — 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.
One of: trigger, repository

Update an automation — request body — 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 itemOne of: 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.
One of: trigger, repository

Update an automation — request body — body triggers discussion opened

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
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.
One of: trigger, repository

Update an automation — request body — body triggers interval

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.
cadencearrayRequired within parentOne or more schedules on which the Automation runs.
Minimum items: 1
Unique items: true
cadence[]stringEach itemOne of: hourly, daily, weekly
day_of_weekintegerOptionalUTC weekday anchor for weekly schedules, where `0` is Sunday and `6` is Saturday. Omitted weekly values default to Monday (`1`).
Maximum: 6
Minimum: 0
hour_utcintegerOptionalUTC hour anchor (0 through 23) for daily and weekly schedules. Omitted daily and weekly values default to `0` (midnight UTC).
Maximum: 23
Minimum: 0
minute_utcintegerOptionalUTC minute anchor for daily and weekly schedules. Omitted daily and weekly values default to `0`. Must be omitted whenever `cadence` includes `hourly`.
Default: 0
One of: 0, 15, 30, 45
write_scopestringOptionalHas no effect: scheduled runs can change any resource in the repository, and an organization or repository policy requiring trigger-scoped writes does not apply to them.
One of: trigger, repository

Update an automation — request body — body triggers issue assigned

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.
assigneesarrayOptionalAffected assignee logins matched case-insensitively.
Minimum items: 1
Unique items: true
assignees[]stringEach item
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.
One of: trigger, repository

Update an automation — request body — 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.
One of: trigger, repository

Update an automation — request body — body triggers issue 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.
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.
One of: trigger, repository

Update an automation — request body — body triggers issue labeled

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.
labelsarrayOptionalLabel names matched case-insensitively against the label added by the event. Omit or use an empty array to match every added label.
Unique items: true
labels[]stringEach item
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.
One of: trigger, repository

Update an automation — request body — body triggers pull request assigned

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.
assigneesarrayOptionalAffected assignee logins matched case-insensitively.
Minimum items: 1
Unique items: true
assignees[]stringEach item
pathsarrayOptionalGitignore-style changed-file path globs.
Minimum items: 1
paths[]stringEach itemMinimum length: 1
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.
One of: trigger, repository

Update an automation — request body — body triggers pull request 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.
pathsarrayOptionalGitignore-style changed-file path globs.
Minimum items: 1
paths[]stringEach itemMinimum length: 1
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.
One of: trigger, repository

Update an automation — request body — body triggers pull request 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.
comment_typesarrayRequired within parentPull request conversation and inline review comment types to match.
Maximum items: 2
Minimum items: 1
Unique items: true
comment_types[]stringEach itemOne of: timeline_comment, review_comment
pathsarrayOptionalGitignore-style changed-file path globs.
Minimum items: 1
paths[]stringEach itemMinimum length: 1
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.
One of: trigger, repository

Update an automation — request body — body triggers pull request labeled

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.
labelsarrayOptionalLabel names matched case-insensitively against the label added by the event. Omit or use an empty array to match every added label.
Unique items: true
labels[]stringEach item
pathsarrayOptionalGitignore-style changed-file path globs.
Minimum items: 1
paths[]stringEach itemMinimum length: 1
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.
One of: trigger, repository

Update an automation — request body — body triggers pull request review submitted

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.
pathsarrayOptionalGitignore-style changed-file path globs.
Minimum items: 1
paths[]stringEach itemMinimum length: 1
querystringOptionalA GitHub issue or pull request search query.
Minimum length: 1
statesarrayRequired within parentSubmitted review states to match.
Maximum items: 3
Minimum items: 1
Unique items: true
states[]stringEach itemOne of: approved, changes_requested, commented
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.
One of: trigger, repository

Update an automation — request body — body triggers workflow run

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.
conclusionsarrayRequired within parentWorkflow conclusions to match. The current trigger supports failure.
Maximum items: 1
Minimum items: 1
conclusions[]stringEach itemOne of: failure
querystringOptionalA GitHub issue or pull request search query.
Minimum length: 1
workflowsarrayRequired within parentWorkflow names matched against the name in each workflow YAML file.
Minimum items: 1
workflows[]stringEach itemMinimum 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.
One of: trigger, repository

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.