📖 Getting Started: Open Daily and weekly tasks to start work on maintenance tasks.
This repository contains scripts that help monitor code repos for changes that could break documentation builds and help identify when documentation updates are needed.
When sample code from a code repo is referenced in documentation, certain changes in the code repos can break the documentation build:
- File deletion - Referenced files are removed
- File renaming - Referenced file paths change
- Content changes - Named sections or code blocks are modified or removed
Also, when a code file is updated, the document won't reflect the changes until a rebuild of the markdown file is triggered.
The scripts in this repository help prevent problems and identify necessary document updates.
All code repo configurations are centralized in config.yml
. This file contains:
- Repository details (owner, repo name, team assignments)
- Search paths for each repository
- File naming patterns and output directories
- Default settings for various scripts
To add or modify repositories, edit the config.yml
file.
Note: The docs repo is currently hardcoded as MicrosoftDocs/azure-ai-docs
in the scripts.
Scripts in this repository can be run locally or in a GitHub Codespace.
See instructions in Daily and weekly tasks for details.
Click to view script details
find-prs.py - Find PRs requiring team review
- Identifies pull requests across multiple repositories that need review from documentation team members
- Generates a markdown report (
pr-review-report-DATE.md
) with clickable links - Usage:
python find-prs.py
find-snippets.py - Scan documentation for code references
- Creates
refs-found.csv
file used by other scripts - Generates CODEOWNERS files for each repository
- Usage:
python find-snippets.py
pr-report.py - Analyze specific PR impact on documentation
- Evaluates whether a specific PR will cause documentation build issues
- Supports repository-specific arguments for targeting different code repos
- Usage:
python pr-report.py 91
(for azureml-examples)python pr-report.py 169 ai
(for foundry-samples)python pr-report.py 267 ai2
(for azureai-samples)
merge-report.py - Review recent merged PRs
- Shows PRs merged in the last N days (default: 8) that may require documentation updates
- Usage:
python merge-report.py
orpython merge-report.py 14
These files provide functions used by the main scripts:
- config.py - Reads repository configurations from
config.yml
- helpers.py - Common functions for snippet processing and file operations
- gh_auth.py - GitHub authentication and API interaction functions
- find_pr_files.py - Functions for analyzing PR file changes and documentation impact
- Initial Setup: Run
find-snippets.py
to scan documentation and create the reference database - Regular Monitoring: Use
find-prs.py
to identify PRs requiring review - PR Analysis: Use
pr-report.py
to evaluate specific PRs before approval - Post-Merge Review: Use
merge-report.py
to identify documentation that may need updates after PRs are merged
The monitored repositories are defined in config.yml
:
- foundry-samples (Azure-AI-Foundry/foundry-samples)
- azureai-samples (Azure-Samples/azureai-samples)
- azureml-examples (Azure/azureml-examples)
Each repository configuration includes team assignments, search paths, and service categorizations for automated processing.