diff --git a/docs/src/content/docs/experimental/experiments.md b/docs/src/content/docs/experimental/experiments.md index 04285680769..02bb6866707 100644 --- a/docs/src/content/docs/experimental/experiments.md +++ b/docs/src/content/docs/experimental/experiments.md @@ -9,11 +9,22 @@ sidebar: A/B Experiments is an experimental feature. ::: -The `experiments` section of the workflow frontmatter enables statistical A/B testing by defining named experiments, each with a set of variant values. At runtime the activation job selects one variant per experiment using a balanced round-robin counter and exposes the selection to the workflow prompt. +Use the `experiments` frontmatter section to compare workflow variants across +repeated runs. Each experiment declares a name and a set of variants. On every +run, the activation job picks one variant and exposes it to the prompt. + +Experiments work best when you test one workflow choice at a time, such as: + +- prompt wording +- model selection +- whether to delegate to a sub-agent +- which subskill (inline skill) to invoke ## Declaring experiments -Add an `experiments` map to the workflow frontmatter. Each key names an experiment; the value is either a simple array of variants (bare-array form) or a rich object with additional metadata fields. +Add an `experiments` map to the workflow frontmatter. Each key names an +experiment. The value is either a simple array of variants (bare-array form) or +a rich object with additional metadata fields. ### Bare-array form @@ -34,7 +45,7 @@ Summarize this issue in a **${{ experiments.style }}** way. ### Rich object form -Use the object form to attach metadata that drives automated reporting, guardrail enforcement, and lifecycle tracking: +Use the object form when you want built-in reporting and experiment metadata: ```aw wrap --- @@ -67,13 +78,18 @@ Summarize the findings in a **${{ experiments.prompt_style }}** way. ``` > [!NOTE] -> Experiment names must be valid identifiers: start with a letter or underscore, followed by letters, digits, or underscores (e.g. `style`, `feature_1`). Names that do not match this pattern are ignored. +> Experiment names must be valid identifiers: start with a letter or +> underscore, followed by letters, digits, or underscores. For example, use +> `style` or `feature_1`. Names that do not match this pattern are ignored. ## Using variants in the prompt -Reference a variant with `${{ experiments. }}`. At runtime this is substituted with the selected variant string (e.g. `concise`). +Reference a variant with `${{ experiments. }}`. At runtime, gh-aw +replaces the expression with the selected variant string, such as `concise`. -Use the `{{#if experiments. }}` block syntax for conditional prompt sections. A variant value of `no` is treated as falsy, enabling yes/no flag experiments: +Use the `{{#if experiments. }}` block syntax for conditional prompt +sections. A variant value of `no` is treated as falsy, which makes yes/no +experiments easy to express: ```aw wrap --- @@ -88,15 +104,113 @@ Talk like a caveman in all your responses. Me test. You run. Address the issue described above. ``` +## Common experiment ideas + +Most experiments compare a single decision in the workflow. The examples below +show common patterns. + +### Try different prompt styles + +```aw wrap +--- +experiments: + style: [concise, detailed] +--- + +Summarize this issue in a **${{ experiments.style }}** way. +``` + +### Try different models + +Model experiments are useful when you want to compare speed, cost, and output +quality. gh-aw model aliases such as `small` and `large` are often a good place +to start. See [Model Aliases](/gh-aw/reference/model-tables/). + +```aw wrap +--- +engine: + id: copilot + model: ${{ experiments.model }} + +experiments: + model: [small, large] +--- + +Review the issue and recommend the next action. +``` + +### Try using a sub-agent + +This pattern compares a direct prompt with a delegated sub-agent flow. + +```aw wrap +--- +experiments: + use_summarizer: [yes, no] +--- + +{{#if experiments.use_summarizer }} +Use the `file-summarizer` sub-agent to summarize `README.md`, then continue. +{{/if}} + +Write a short project overview for maintainers. + +## agent: `file-summarizer` +--- +model: small +description: Summarizes a file in a few sentences +--- +Read the given file and return a concise summary. +``` + +See [Inline Sub-Agents](/gh-aw/reference/inline-sub-agents/) for the full +syntax. + +### Try different subskills + +This pattern compares two reusable instruction blocks, sometimes called +subskills, without changing the main workflow prompt. + +```aw wrap +--- +experiments: + triage_skill: [triage-fast, triage-deep] +--- + +Use the `${{ experiments.triage_skill }}` skill to classify this issue. + +## skill: `triage-fast` +--- +description: Fast issue triage +--- +Classify the issue and suggest the smallest next step. + +## skill: `triage-deep` +--- +description: Detailed issue triage +--- +Classify the issue, identify missing context, and recommend a fuller follow-up +plan. +``` + ## Statistical balancing -The activation job maintains a per-variant invocation counter that is persisted according to the `storage` setting in the `experiments:` block (see [Storage Configuration](#storage-configuration) below). The variant with the lowest cumulative count is selected on each run; when multiple variants share the lowest count (including the very first run when state is empty), one is chosen at random so no variant is systematically favoured. Over N runs every variant is used approximately N/K times (K = variant count), providing basic A/B balance with no configuration. +The activation job tracks how often each variant has been selected. The counter +is stored using the `storage` setting in the `experiments:` block. By default, +gh-aw chooses the least-used variant on each run. If multiple variants are tied, +including on the first run, one of them is chosen at random. Over time, this +keeps usage roughly balanced across variants. -When a `weight` array is provided, weighted-random selection is used instead of round-robin. Each variant is chosen with probability proportional to its weight (e.g. `[70, 30]` gives the first variant a 70% probability). When `start_date` or `end_date` is set and today falls outside the window, the control variant (first entry) is returned without incrementing any counter. +When you provide a `weight` array, gh-aw uses weighted random selection instead +of least-used selection. For example, `[70, 30]` gives the first variant a 70% +selection probability. If `start_date` or `end_date` is set and the current +date falls outside that range, gh-aw returns the control variant (the first +entry) without incrementing any counter. ## Storage Configuration -The `storage` key inside the `experiments:` map controls how experiment state is persisted: +The `storage` key inside the `experiments:` map controls where experiment state +is persisted: ```yaml experiments: @@ -109,7 +223,8 @@ experiments: | `repo` (**default**) | Commits state to a git branch named `experiments/{sanitizedWorkflowID}` (workflow ID lowercased with hyphens removed, e.g. `my-workflow` โ†’ `experiments/myworkflow`). Durable โ€” survives cache evictions. Requires `contents: write` permission (added automatically by the compiler). | | `cache` | Uses GitHub Actions cache (legacy). State may be evicted after 7 days of inactivity. | -When `storage: repo`, the compiler adds a `push_experiments_state` job that runs after the activation job and commits the updated `state.json` to the experiments branch. +When `storage: repo`, the compiler adds a `push_experiments_state` job after the +activation job and commits the updated `state.json` to the experiments branch. ## Accessing assignments downstream @@ -152,7 +267,9 @@ gh aw audit --experiment prompt_style --variant concise ### Step summary -Each activation job writes a Markdown step summary that shows variant assignments, cumulative counts, and โ€” when the rich object form is used โ€” progress toward `min_samples`: +Each activation job writes a Markdown step summary that shows the selected +variants, cumulative counts, and, when you use the object form, progress toward +`min_samples`: ``` ## ๐Ÿงช A/B Experiment Assignments diff --git a/pkg/workflow/schemas/github-workflow.json b/pkg/workflow/schemas/github-workflow.json index ca272f38383..f670ca49089 100644 --- a/pkg/workflow/schemas/github-workflow.json +++ b/pkg/workflow/schemas/github-workflow.json @@ -1095,11 +1095,19 @@ "properties": { "branch_protection_rule": { "$comment": "https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#branch_protection_rule", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the branch_protection_rule event occurs. More than one activity type triggers this event.", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["created", "edited", "deleted"] @@ -1110,11 +1118,19 @@ }, "check_run": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#check-run-event-check_run", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the check_run event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/checks/runs.", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["created", "rerequested", "completed", "requested_action"] @@ -1125,11 +1141,19 @@ }, "check_suite": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#check-suite-event-check_suite", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the check_suite event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/checks/suites/.", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["completed", "requested", "rerequested"] @@ -1140,31 +1164,55 @@ }, "create": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#create-event-create", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime someone creates a branch or tag, which triggers the create event. For information about the REST API, see https://developer.github.com/v3/git/refs/#create-a-reference." }, "delete": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#delete-event-delete", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime someone deletes a branch or tag, which triggers the delete event. For information about the REST API, see https://developer.github.com/v3/git/refs/#delete-a-reference." }, "deployment": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#deployment-event-deployment", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime someone creates a deployment, which triggers the deployment event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see https://developer.github.com/v3/repos/deployments/." }, "deployment_status": { "$comment": "https://docs.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime a third party provides a deployment status, which triggers the deployment_status event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see https://developer.github.com/v3/repos/deployments/#create-a-deployment-status." }, "discussion": { "$comment": "https://docs.github.com/en/actions/reference/events-that-trigger-workflows#discussion", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the discussion event occurs. More than one activity type triggers this event. For information about the GraphQL API, see https://docs.github.com/en/graphql/guides/using-the-graphql-api-for-discussions", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["created", "edited", "deleted", "transferred", "pinned", "unpinned", "labeled", "unlabeled", "locked", "unlocked", "category_changed", "answered", "unanswered"] @@ -1175,11 +1223,19 @@ }, "discussion_comment": { "$comment": "https://docs.github.com/en/actions/reference/events-that-trigger-workflows#discussion_comment", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the discussion_comment event occurs. More than one activity type triggers this event. For information about the GraphQL API, see https://docs.github.com/en/graphql/guides/using-the-graphql-api-for-discussions", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["created", "edited", "deleted"] @@ -1190,21 +1246,37 @@ }, "fork": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#fork-event-fork", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime when someone forks a repository, which triggers the fork event. For information about the REST API, see https://developer.github.com/v3/repos/forks/#create-a-fork." }, "gollum": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#gollum-event-gollum", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow when someone creates or updates a Wiki page, which triggers the gollum event." }, "issue_comment": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#issue-comment-event-issue_comment", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the issue_comment event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/comments/.", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["created", "edited", "deleted"] @@ -1215,11 +1287,19 @@ }, "issues": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#issues-event-issues", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the issues event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues.", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["opened", "edited", "deleted", "transferred", "pinned", "unpinned", "closed", "reopened", "assigned", "unassigned", "labeled", "unlabeled", "locked", "unlocked", "milestoned", "demilestoned"] @@ -1230,11 +1310,19 @@ }, "label": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#label-event-label", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the label event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/labels/.", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["created", "edited", "deleted"] @@ -1245,11 +1333,19 @@ }, "merge_group": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#merge_group", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow when a pull request is added to a merge queue, which adds the pull request to a merge group. For information about the merge queue, see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request-with-a-merge-queue .", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["checks_requested"] @@ -1260,11 +1356,19 @@ }, "milestone": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#milestone-event-milestone", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the milestone event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/milestones/.", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["created", "closed", "opened", "edited", "deleted"] @@ -1275,16 +1379,28 @@ }, "page_build": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#page-build-event-page_build", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime someone pushes to a GitHub Pages-enabled branch, which triggers the page_build event. For information about the REST API, see https://developer.github.com/v3/repos/pages/." }, "project": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-event-project", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the project event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/.", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["created", "updated", "closed", "reopened", "edited", "deleted"] @@ -1295,11 +1411,19 @@ }, "project_card": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-card-event-project_card", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the project_card event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/cards.", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["created", "moved", "converted", "edited", "deleted"] @@ -1310,11 +1434,19 @@ }, "project_column": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-column-event-project_column", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the project_column event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/columns.", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["created", "updated", "moved", "deleted"] @@ -1325,7 +1457,11 @@ }, "public": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#public-event-public", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime someone makes a private repository public, which triggers the public event. For information about the REST API, see https://developer.github.com/v3/repos/#edit." }, "pull_request": { @@ -1341,7 +1477,11 @@ "type": "object", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": [ @@ -1412,11 +1552,19 @@ }, "pull_request_review": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-review-event-pull_request_review", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the pull_request_review event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls/reviews.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["submitted", "edited", "dismissed"] @@ -1427,11 +1575,19 @@ }, "pull_request_review_comment": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-review-comment-event-pull_request_review_comment", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime a comment on a pull request's unified diff is modified, which triggers the pull_request_review_comment event. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls/comments.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["created", "edited", "deleted"] @@ -1453,7 +1609,11 @@ "type": "object", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": [ @@ -1572,11 +1732,19 @@ }, "registry_package": { "$comment": "https://help.github.com/en/actions/reference/events-that-trigger-workflows#registry-package-event-registry_package", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime a package is published or updated. For more information, see https://help.github.com/en/github/managing-packages-with-github-packages.", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["published", "updated"] @@ -1587,11 +1755,19 @@ }, "release": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#release-event-release", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the release event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/repos/releases/ in the GitHub Developer documentation.", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["published", "unpublished", "created", "edited", "deleted", "prereleased", "released"] @@ -1602,12 +1778,20 @@ }, "status": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#status-event-status", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the status of a Git commit changes, which triggers the status event. For information about the REST API, see https://developer.github.com/v3/repos/statuses/." }, "watch": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#watch-event-watch", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "Runs your workflow anytime the watch event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/activity/starring/." }, "workflow_call": { @@ -1724,11 +1908,19 @@ }, "workflow_run": { "$comment": "https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_run", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "This event occurs when a workflow run is requested or completed, and allows you to execute a workflow based on the finished result of another workflow. For example, if your pull_request workflow generates build artifacts, you can create a new workflow that uses workflow_run to analyze the results and add a comment to the original pull request.", "properties": { "types": { - "$ref": "#/definitions/types", + "allOf": [ + { + "$ref": "#/definitions/types" + } + ], "items": { "type": "string", "enum": ["requested", "completed", "in_progress"] @@ -1749,7 +1941,11 @@ }, "repository_dispatch": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#external-events-repository_dispatch", - "$ref": "#/definitions/eventObject", + "allOf": [ + { + "$ref": "#/definitions/eventObject" + } + ], "description": "You can use the GitHub API to trigger a webhook event called repository_dispatch when you want to trigger a workflow for activity that happens outside of GitHub. For more information, see https://developer.github.com/v3/repos/#create-a-repository-dispatch-event.\nTo trigger the custom repository_dispatch webhook event, you must send a POST request to a GitHub API endpoint and provide an event_type name to describe the activity type. To trigger a workflow run, you must also configure your workflow to use the repository_dispatch event." }, "schedule": {