Add PR documentation check as agentic workflow#34572
Open
jfversluis wants to merge 2 commits intomainfrom
Open
Add PR documentation check as agentic workflow#34572jfversluis wants to merge 2 commits intomainfrom
jfversluis wants to merge 2 commits intomainfrom
Conversation
Adds a GitHub Actions workflow that analyzes merged PRs using Copilot CLI to determine if documentation updates are needed on dotnet/docs-maui. The workflow has two jobs: - A cheap filter job that skips bot PRs, backports, test/infra-only changes, and fast-tracks PublicAPI.Unshipped.txt changes - An expensive analysis job that uses Copilot CLI to generate specific documentation recommendations and creates tracking issues on docs-maui Inspired by dotnet/aspire's pr-docs-hook workflow, adapted for MAUI's repo structure, PR volume, and docs-maui integration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34572Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34572" |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an automated post-merge GitHub Actions workflow that decides whether a merged PR likely needs documentation updates in dotnet/docs-maui, and (when needed) files a tracking issue plus comments back on the PR.
Changes:
- Introduces a two-job workflow (
filter+ gatedanalyze) to limit Copilot analysis to likely doc-impacting PRs. - Runs Copilot CLI against the PR diff using a MAUI-specific prompt and posts results back to the PR.
- Creates a cross-repo issue in
dotnet/docs-mauiwhen documentation updates are recommended.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| .github/workflows/pr-docs-hook.yml | New workflow that filters merged PRs, runs Copilot diff analysis, optionally opens docs-maui issues, and comments results on the PR. |
| .github/prompts/docs-audit-prompt.md | Prompt text used by the workflow to guide documentation-impact analysis and issue formatting. |
You can also share your feedback on Copilot code review. Take the survey.
Replaces the traditional GitHub Actions workflow (pr-docs-hook.yml) with a GitHub Agentic Workflow (pr-docs-check.md) for analyzing merged PRs for documentation needs on dotnet/docs-maui. Changes: - New: .github/workflows/pr-docs-check.md (agentic workflow) - Removed: .github/workflows/pr-docs-hook.yml (old shell-based workflow) - Removed: .github/prompts/docs-audit-prompt.md (prompt now inline in .md) - Updated: .gitignore (add .github/aw/logs/) The agentic workflow: - Uses natural language instructions instead of bash scripts - Authenticates cross-repo via GitHub App (no PAT expiration) - Uses safe-outputs for controlled issue creation and PR commenting - Includes smart filtering: skips bot PRs, backports, test/infra-only changes - Always analyzes PublicAPI.Unshipped.txt and template changes - Triggers on merges to main, net*.0, and release/* branches Prerequisites: - GitHub App with Issues (Read & Write) on dotnet/docs-maui - Secrets: DOCS_APP_ID (variable) and DOCS_APP_PRIVATE_KEY (secret) - Label 'docs-from-code' on dotnet/docs-maui Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Mar 20, 2026
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description
Adds a GitHub Agentic Workflow that automatically analyzes merged PRs to determine if documentation updates are needed on
dotnet/docs-maui. Inspired by dotnet/aspire PR #14526.How it works
A single
.mdfile (.github/workflows/pr-docs-check.md) contains natural language instructions for an AI agent that:PublicAPI.Unshipped.txtor template changesdotnet/docs-mauito find relevant pagesdotnet/docs-mauiand comments on the PRWhy agentic workflow instead of traditional Actions?
Files changed
.github/workflows/pr-docs-check.md— the agentic workflow.gitignore— ignore.github/aw/logs/.github/workflows/pr-docs-hook.yml— replaced by agentic workflow.github/prompts/docs-audit-prompt.md— prompt now inline in workflowTriggers
main,net*.0, andrelease/*branchesworkflow_dispatchwith a PR numberPrerequisites
dotnet/mauianddotnet/docs-mauiDOCS_APP_ID(variable) andDOCS_APP_PRIVATE_KEY(secret)docs-from-codeondotnet/docs-maui