Skip to content

Add PR documentation check agentic workflow#36

Draft
jfversluis wants to merge 4 commits intomainfrom
feature/pr-docs-check
Draft

Add PR documentation check agentic workflow#36
jfversluis wants to merge 4 commits intomainfrom
feature/pr-docs-check

Conversation

@jfversluis
Copy link
Copy Markdown
Member

@jfversluis jfversluis commented Mar 29, 2026

Summary

Adds a GitHub Agentic Workflow that automatically analyzes merged PRs and opens draft PRs directly on dotnet/docs-maui when documentation updates are needed.

How it works

  1. Triggers on every merged PR to main or release/* (with paths-ignore for build/CI/meta files)
  2. Filters out bot PRs, backports, test-only changes
  3. Always analyzes PRs that touch CLI DevFlow code, MCP tools, or .csproj files
    opens a draft PR on dotnet/docs-maui and comments on the source PR with a link
    comments on the source PR with a brief explanation

Security

  • Agent runs read-only in a sandboxed container with network isolation
  • Writes go through safe-outputs only (draft PR on docs-maui + comment on source PR)
  • Cross-repo auth via MAUI_BOT_TOKEN PAT

Files

File Purpose
.github/workflows/pr-docs-check.md Agentic workflow definition
.github/workflows/pr-docs-check.lock.yml Compiled GitHub Actions YAML (auto-generated)
.github/aw/actions-lock.json SHA-pinned action references
.gitattributes Marks lock files as generated
.gitignore Added .github/aw/logs/

Prerequisites before merging

  1. Add MAUI_BOT_TOKEN repository secret (PAT with Contents + Pull Requests write access to dotnet/docs-maui)
  2. Add COPILOT_GITHUB_TOKEN secret for the Copilot engine (may already be configured at org level)
  3. Add the docs-from-code label to dotnet/docs-maui

jfversluis and others added 4 commits March 29, 2026 21:04
Adds a GitHub Agentic Workflow that analyzes merged PRs and opens draft PRs
directly on dotnet/docs-maui when documentation updates are needed.

Triggers on every merged PR (with paths-ignore for build/CI/meta files).
The agent reads the diff, determines if user-facing changes affect docs,
and either opens a draft PR on docs-maui updating dev-flow.md or comments
on the source PR that no docs update is needed.

Requires a GitHub App (DOCS_APP_ID + DOCS_APP_PRIVATE_KEY) installed on
both dotnet/maui-labs and dotnet/docs-maui for cross-repo authentication.
Modeled after dotnet/maui PR #34572 and dotnet/aspire PR #14526.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the GitHub App auth (DOCS_APP_ID + DOCS_APP_PRIVATE_KEY) with
the MAUI_BOT_TOKEN PAT for cross-repo operations on dotnet/docs-maui.
This simplifies the prerequisites from GitHub App setup to a single secret.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Let the workflow try creating PRs on dotnet/docs-maui using the default
token to see if the org-level permissions are sufficient.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add MAUI_BOT_TOKEN for cross-repo auth on dotnet/docs-maui
- Fix MCP tools path: src/Cli/Microsoft.Maui.Cli/DevFlow/ (code was moved)
- Remove non-existent PublicAPI.Unshipped.txt trigger
- Handle workflow_dispatch edge cases: invalid PR numbers, unmerged PRs
- Update CLI command references: DevFlow CLI -> maui devflow
- Check for conflicting draft PRs before opening new ones

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant