From 85c155f2be307776076aa638754ff4c5077c06ee Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 07:36:25 +0000 Subject: [PATCH] docs: align distribution and docs-ai-menu workflow docs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/operations/distribute-client-workflow.md | 3 +++ docs/workflows/distribute-client-workflow.md | 3 +++ docs/workflows/docs-aw-pr-ai-menu.md | 5 +++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/operations/distribute-client-workflow.md b/docs/operations/distribute-client-workflow.md index e0c8b03..7ae304f 100644 --- a/docs/operations/distribute-client-workflow.md +++ b/docs/operations/distribute-client-workflow.md @@ -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: @@ -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`) diff --git a/docs/workflows/distribute-client-workflow.md b/docs/workflows/distribute-client-workflow.md index 0838517..553f079 100644 --- a/docs/workflows/distribute-client-workflow.md +++ b/docs/workflows/distribute-client-workflow.md @@ -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 @@ -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. diff --git a/docs/workflows/docs-aw-pr-ai-menu.md b/docs/workflows/docs-aw-pr-ai-menu.md index eefe1a7..1a59f72 100644 --- a/docs/workflows/docs-aw-pr-ai-menu.md +++ b/docs/workflows/docs-aw-pr-ai-menu.md @@ -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