{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"> [!NOTE]\n> This endpoint is in public preview and is subject to change.\n\nUpdates an existing automation in a repository. The automation\nmust be a personal automation belonging to you or a shared automation.\nOmitted fields are left unchanged. The automation's `type` is immutable.\n\nGitHub App installation access tokens can update shared automations.\nThe installation must belong to the repository owner and the token must have\n\"Agent tasks\" repository permissions (write). Personal automations require a user token.\n\nTo call this endpoint, you must have write access to the repository and the\n\"Allow automations\" setting must be enabled for the repository.\n\nOAuth app tokens and personal access tokens (classic) need:\n\n* the `repo` scope for private or internal repositories\n* the `repo` scope or `public_repo` scope for public repositories\n\n**Fine-grained access tokens for \"Update an automation\"**\n\nThis endpoint works with the following fine-grained token types:\n\n* [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)\n* [GitHub App installation access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app)\n* [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)\n\nThe fine-grained token must have the following permission set:\n\n* \"Agent tasks\" repository permissions (write)\n","properties":{"path":{"type":"object","properties":{"owner":{"type":"string","description":"The account owner of the repository. The name is not case sensitive."},"repo":{"type":"string","description":"The name of the repository. The name is not case sensitive."},"automation_id":{"type":"string","description":"The unique identifier of the automation."}},"required":["owner","repo","automation_id"],"additionalProperties":false},"body":{"type":"object","description":"Request body for editing an automation. Omitted fields are left unchanged. Explicit null values are rejected.","properties":{"name":{"type":"string","description":"The name of the automation."},"enabled":{"type":"boolean","description":"Set to true to enable, false to disable. Omit to leave unchanged."},"require_actor_write_permission":{"type":"boolean","description":"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. When policy validation is enabled, explicitly setting false returns 422 if effective organization or repository policy disallows read-access triggers. The actor requirement does not apply to interval-scheduled runs, which always run as the automation owner. Omit to leave unchanged."},"continuous_history":{"type":"boolean","description":"When true, runs of this automation build on the session history of its previous runs, and runs of the same automation are serialized. Not tracked in revision history. Omit to leave unchanged."},"model":{"type":"string","description":"The model to use for sessions triggered by this automation. Omit to leave unchanged. Send an empty string to clear the override and let the platform select the model."},"reasoning_effort":{"description":"The reasoning effort to use for sessions triggered by this automation. Omit to leave unchanged. Send an empty string to clear the override and use the model's default.","oneOf":[{"type":"string","maxLength":0},{"type":"string","enum":["none","low","medium","high","xhigh","max"]}]},"triggers":{"type":"object","additionalProperties":false,"description":"Trigger configuration for the automation.","properties":{"interval":{"type":"object","additionalProperties":false,"required":["cadence"],"properties":{"cadence":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","enum":["hourly","daily","weekly"]},"description":"One or more schedules on which the Automation runs."},"hour_utc":{"type":"integer","minimum":0,"maximum":23,"description":"UTC hour anchor (0 through 23) for daily and weekly schedules. Omitted daily and weekly values default to `0` (midnight UTC).","examples":[0]},"day_of_week":{"type":"integer","minimum":0,"maximum":6,"description":"UTC weekday anchor for weekly schedules, where `0` is Sunday and `6` is Saturday. Omitted weekly values default to Monday (`1`).","examples":[0]},"minute_utc":{"type":"integer","enum":[0,15,30,45],"default":0,"description":"UTC minute anchor for daily and weekly schedules. Omitted daily and weekly values default to `0`. Must be omitted whenever `cadence` includes `hourly`."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Has 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"issue_opened":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"issue_labeled":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"labels":{"type":"array","uniqueItems":true,"items":{"type":"string"},"description":"Label names matched case-insensitively against the label added by the event. Omit or use an empty array to match every added label."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"workflow_run":{"type":"object","additionalProperties":false,"required":["workflows","conclusions"],"properties":{"workflows":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Workflow names matched against the name in each workflow YAML file."},"conclusions":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"string","enum":["failure"]},"description":"Workflow conclusions to match. The current trigger supports failure."},"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_opened":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_synchronize":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_merged":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"issue_comment":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"body_substring":{"type":"string","description":"A case-insensitive substring matched against the event body."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_comment":{"type":"object","additionalProperties":false,"required":["comment_types"],"properties":{"comment_types":{"type":"array","minItems":1,"maxItems":2,"uniqueItems":true,"items":{"type":"string","enum":["timeline_comment","review_comment"]},"description":"Pull request conversation and inline review comment types to match."},"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"body_substring":{"type":"string","description":"A case-insensitive substring matched against the event body."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"discussion_opened":{"type":"object","additionalProperties":false,"properties":{"categories":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string"},"description":"Discussion category names matched case-insensitively."},"body_substring":{"type":"string","description":"A case-insensitive substring matched against the event body."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"discussion_updated":{"type":"object","additionalProperties":false,"properties":{"categories":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string"},"description":"Discussion category names matched case-insensitively."},"body_substring":{"type":"string","description":"A case-insensitive substring matched against the event body."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"discussion_comment":{"type":"object","additionalProperties":false,"properties":{"comment_types":{"type":"array","minItems":1,"maxItems":2,"uniqueItems":true,"items":{"type":"string","enum":["comment","reply"]},"description":"Top-level discussion comments and replies to match. Omit to match both."},"categories":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string"},"description":"Discussion category names matched case-insensitively."},"body_substring":{"type":"string","description":"A case-insensitive substring matched against the event body."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"issue_assigned":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"assignees":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string"},"description":"Affected assignee logins matched case-insensitively."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_assigned":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"assignees":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string"},"description":"Affected assignee logins matched case-insensitively."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"sub_issue_added":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_ready_for_review":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_labeled":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"labels":{"type":"array","uniqueItems":true,"items":{"type":"string"},"description":"Label names matched case-insensitively against the label added by the event. Omit or use an empty array to match every added label."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_merge_conflict":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_review_submitted":{"type":"object","additionalProperties":false,"required":["states"],"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"states":{"type":"array","minItems":1,"maxItems":3,"uniqueItems":true,"items":{"type":"string","enum":["approved","changes_requested","commented"]},"description":"Submitted review states to match."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_review_requested":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"issue_closed":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"issue_reopened":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_closed":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_reopened":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_converted_to_draft":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_review_dismissed":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_review_thread_resolved":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"pull_request_review_thread_unresolved":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"A GitHub issue or pull request search query."},"paths":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"Gitignore-style changed-file path globs."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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_completed":{"type":"object","additionalProperties":false,"required":["automation_ids"],"properties":{"automation_ids":{"type":"array","minItems":1,"maxItems":3,"uniqueItems":true,"items":{"type":"string"},"description":"Upstream Automation IDs in the same repository."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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_failed":{"type":"object","additionalProperties":false,"required":["automation_ids"],"properties":{"automation_ids":{"type":"array","minItems":1,"maxItems":3,"uniqueItems":true,"items":{"type":"string"},"description":"Upstream 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."},"reasons":{"type":"array","minItems":1,"maxItems":3,"uniqueItems":true,"items":{"type":"string","enum":["reported","crashed","timed_out"]},"description":"Failure reasons to match. Omit to match only reported failures."},"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"code_scanning_alert":{"type":"object","additionalProperties":false,"description":"Runs 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.","properties":{"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"secret_scanning_alert":{"type":"object","additionalProperties":false,"description":"Runs 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.","properties":{"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}},"dependabot_alert":{"type":"object","additionalProperties":false,"description":"Runs 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.","properties":{"write_scope":{"type":"string","enum":["trigger","repository"],"description":"Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. 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."},"allow_copilot_triggers":{"type":"boolean","description":"When 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."}}}}},"prompt":{"type":"string","maxLength":10000,"description":"The prompt for the automation."},"tools":{"type":"array","items":{"type":"string"},"description":"The tools available to the automation. Send an empty array to clear all tools."}},"examples":[{"name":"Issue triage and prioritization","enabled":true,"model":"gpt-5.4","reasoning_effort":"high","triggers":{"issue_opened":{"query":"is:open label:auto-triage"}}}]}},"required":["path","body"],"additionalProperties":false},"name":"Update an automation","id":"github.agent-automations.edit-repo-automation","example":{"path":{"owner":"octocat","repo":"hello-world","automation_id":"example"},"body":{"name":"Issue triage and prioritization","enabled":true,"model":"gpt-5.4","reasoning_effort":"high","triggers":{"issue_opened":{"query":"is:open label:auto-triage"}}}},"maxRequests":1,"summary":false}}