Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/operations/distribute-client-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Triggers:
- `push` to `main` when either of these paths change:
- `config/**/active-repositories.json` (per-org repo lists)
- [.github/remote-workflow-template/](../../.github/remote-workflow-template/)
- `.github/workflows/distribute-client-workflow.yml` (distribution workflow definition)
- `scripts/build_target_operations.py` (target operation builder)
- `workflow_dispatch` with optional `force` boolean input.

Execution stages:
Expand Down Expand Up @@ -83,6 +85,7 @@ Workflow outputs written by the script:

- `targets`: JSON array of objects like `{"repository":"owner/repo","operation":"install|remove"}`
- `has_targets`: `true` when at least one operation exists; otherwise `false`
- `relevant_git_changes`: `true` when `git diff --name-only` between `BASE_REF` and `HEAD` under `config/` and `.github/remote-workflow-template/` is non-empty; otherwise `false`
- `install_count`: count of install/update operations
- `remove_count`: count of removal operations
- `total_count`: total operations (`install_count + remove_count`)
Expand Down
3 changes: 3 additions & 0 deletions docs/workflows/distribute-client-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ This workflow creates PRs across target repositories to install, update, or remo
- Triggered by changes to:
- `config/**/active-repositories.json` (per-org repo lists; example [config/obs/active-repositories.json](../../config/obs/active-repositories.json))
- [.github/remote-workflow-template/](../../.github/remote-workflow-template/) (per-org subtrees such as `obs/`, `docs/`)
- `.github/workflows/distribute-client-workflow.yml` (distribution workflow definition)
- `scripts/build_target_operations.py` (target operation builder)
- Or manually triggered with `workflow_dispatch`.

## Usage
Expand Down Expand Up @@ -39,6 +41,7 @@ Core behavior:
- The target builder step exposes:
- `targets` (JSON matrix entries with `repository`, `operation`, `files`, and for install ops `remove_files`)
- `has_targets` (`true`/`false`)
- `relevant_git_changes` (`true` when relevant `git diff` changes are detected under `config/` or `.github/remote-workflow-template/`; otherwise `false`)
- `install_count`, `remove_count`, `total_count`
- Removal operations are computed by comparing current config against the version at `BASE_REF`.
- PR result artifacts are emitted as `repo|op|url` lines and consumed by the summarize step.
Expand Down
5 changes: 3 additions & 2 deletions docs/workflows/docs-aw-pr-ai-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

Source file: [.github/workflows/docs-aw-pr-ai-menu.yml](../../.github/workflows/docs-aw-pr-ai-menu.yml)

Reusable implementation for the Docs PR AI menu. The client template `trigger-docs-aw-pr-ai-menu.yml` calls this workflow on supported PR events.
Reusable implementation for the Docs PR AI menu. The distributed client templates use a split trigger model: `trigger-docs-aw-pr-ai-menu-collect.yml` handles fork-safe `pull_request` events, and `trigger-docs-aw-pr-ai-menu.yml` handles `workflow_run`, `issue_comment`, and `workflow_dispatch` before calling this reusable workflow.

## Prerequisites

- Triggered via `workflow_call` from [trigger-docs-aw-pr-ai-menu.yml](../../.github/remote-workflow-template/docs/.github/workflows/trigger-docs-aw-pr-ai-menu.yml) (distributed client template).
- Triggered via `workflow_call` from [trigger-docs-aw-pr-ai-menu.yml](../../.github/remote-workflow-template/docs/.github/workflows/trigger-docs-aw-pr-ai-menu.yml) (distributed privileged leg).
- PR-event collection is performed by [trigger-docs-aw-pr-ai-menu-collect.yml](../../.github/remote-workflow-template/docs/.github/workflows/trigger-docs-aw-pr-ai-menu-collect.yml), which triggers the privileged leg via `workflow_run`.
- Optional secret input: `COPILOT_GITHUB_TOKEN` (`required: false` at this workflow boundary).

## Usage
Expand Down