Skip to content

Commit 34151e9

Browse files
T-GroCopilot
andauthored
Move state-machine docs output to .github/docs/ to avoid workflows/ protection (#19721)
The agentic-state-machine workflow writes its output under .github/workflows/docs/ which is a protected path requiring the workflows push permission that GitHub Actions cannot grant. Move the output to .github/docs/ and remove the protected-files fallback-to-issue workaround so future runs push PRs directly. Fixes #19717 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent bbe1b32 commit 34151e9

2 files changed

Lines changed: 22 additions & 23 deletions

File tree

.github/workflows/agentic-state-machine.lock.yml

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/agentic-state-machine.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: |
33
Reads all agentic workflow .md files in this repo, extracts the
44
state machine they define, renders Mermaid diagrams + tables in
5-
.github/workflows/docs/state-machine.md. Weekly. Opens PR if changed.
5+
.github/docs/state-machine.md. Weekly. Opens PR if changed.
66
77
on:
88
schedule: every 7d
@@ -28,20 +28,19 @@ safe-outputs:
2828
labels: [automation, NO_RELEASE_NOTES]
2929
draft: false
3030
max: 1
31-
allowed-files: [".github/workflows/docs/**"]
32-
protected-files: fallback-to-issue
31+
allowed-files: [".github/docs/**"]
3332
---
3433

3534
# Agentic State Machine — Diagram Generator
3635

3736
<role>
38-
You read all agentic workflow `.md` files in `.github/workflows/`, extract what they do, and render the result as Mermaid diagrams + tables in `.github/workflows/docs/state-machine.md`.
37+
You read all agentic workflow `.md` files in `.github/workflows/`, extract what they do, and render the result as Mermaid diagrams + tables in `.github/docs/state-machine.md`.
3938
</role>
4039

4140
<rules>
4241
1. Read ALL `.md` files in `.github/workflows/` except `docs/` and `agentic-state-machine.md` (this file).
4342
2. Also read `.github/tooling-check-repo-rules.md` if it exists.
44-
3. If `.github/workflows/docs/state-machine.md` exists, read it. Compare source hashes in the `<!-- sources: ... -->` footer against current files (use `sha256sum`). If unchanged → `noop`. If changed → update incrementally, minimal diff.
43+
3. If `.github/docs/state-machine.md` exists, read it. Compare source hashes in the `<!-- sources: ... -->` footer against current files (use `sha256sum`). If unchanged → `noop`. If changed → update incrementally, minimal diff.
4544
4. Every transition edge must label its actor: 👤 human, 🤖 agent-name, ⚙️ CI, ⏰ scheduler.
4645
5. Do not hardcode sections for "issues" or "PRs". Discover what lifecycle groups exist from the workflows themselves. A workflow that maintains files/branches is its own group.
4746
</rules>
@@ -50,7 +49,7 @@ You read all agentic workflow `.md` files in `.github/workflows/`, extract what
5049
1. `ls .github/workflows/*.md` — list source files. Read each. Compute `sha256sum` for fingerprint.
5150
2. For each workflow extract: triggers, inputs, outputs (safe-outputs), label operations, handovers to other workflows, filters/conditions.
5251
3. Group workflows by what they act on. Typical groups: issues, PRs (by type), files/branches, meta/self-referential. Let the data decide — do not force groups.
53-
4. Write `.github/workflows/docs/state-machine.md` with:
52+
4. Write `.github/docs/state-machine.md` with:
5453

5554
**Workflow overview table** — one row per workflow: trigger, reads, writes, key labels.
5655

0 commit comments

Comments
 (0)