Add doc-sync workflow for automated documentation PR generation#4832
Merged
liliankasem merged 4 commits intomainfrom Mar 20, 2026
Merged
Add doc-sync workflow for automated documentation PR generation#4832liliankasem merged 4 commits intomainfrom
liliankasem merged 4 commits intomainfrom
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Monthly cron job that opens a GitHub Issue 30 days before the AZURE_DOCS_REPO_PAT expires. Prevents silent doc-sync failures due to expired credentials. Deduplicates — won't open a second issue if one is already open. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
satvu
approved these changes
Mar 19, 2026
Instead of a separate cron workflow, the doc-sync workflow now opens a GitHub Issue automatically when it fails to push a PR to the docs repo. The issue includes troubleshooting steps for expired PATs, permission issues, and branch conflicts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
satvu
approved these changes
Mar 19, 2026
c3cabe0 to
81cbcde
Compare
aishwaryabh
approved these changes
Mar 20, 2026
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.
Add doc-sync workflow for automated documentation PR generation
Summary
Adds a GitHub Actions workflow that automatically detects CLI command changes on new releases and opens a PR in
MicrosoftDocs/azure-docs-prwith a detailed change summary for documentation updates.Problem
When CLI commands, help text, arguments, or features change in Core Tools, documentation in
azure-docs-prcan become stale. There's no automated mechanism to flag what changed or prompt doc updates.Solution
A two-job workflow triggered on
release: published:extract-and-diff — Parses
[Action(...)]attributes and.Setup<T>()argument definitions from all 61 CLI commands insrc/Cli/func/Actions/. Uses git worktrees to extract metadata from both the previous and new release tags, then diffs the manifests to identify added, removed, and modified commands.open-docs-pr — If changes are detected, checks out
MicrosoftDocs/azure-docs-pr, creates a branch with diff artifacts, and opens a PR with a markdown summary of all command changes. The PR is assigned to@copilotfor AI-generated doc content.Files
.github/workflows/doc-sync.yml.github/scripts/extract_commands.pydocs/doc-sync.mdWhat the extraction script detects
ShowInHelp)Setup required
AZURE_DOCS_REPO_PATrepository secret withreposcope onMicrosoftDocs/azure-docs-prdoc-sync,azure-functions,core-toolsin the docs repo (or remove the--labelflag)Testing
The extraction script was tested locally against the current codebase: