Changelog verification#2580
Open
anannya03 wants to merge 7 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds CI enforcement for changelog hygiene by requiring either a changelog entry in the PR diff or an explicit skip-changelog PR label, including GitHub authentication in PR pipelines to enable label checks.
Changes:
- Introduces
Test-ChangelogEntry.ps1to detect changelog entry files and/or validateskip-changelogvia GitHub REST API. - Hooks the new validation into
Analyze-Code.ps1and fails analysis when missing both entry and label. - Updates the analyze pipeline job to authenticate to GitHub for PR repos.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| eng/scripts/Test-ChangelogEntry.ps1 | Adds the changelog/label validation script using git diff + GitHub API label lookup |
| eng/scripts/Analyze-Code.ps1 | Executes changelog validation and turns failures into analysis errors |
| eng/pipelines/templates/jobs/analyze.yml | Adds GitHub login step for PR repos so label checks can authenticate |
|
|
||
| Push-Location $RepoRoot | ||
| try { | ||
| $changedFiles = git diff --name-only --diff-filter=A "origin/main...HEAD" 2>&1 |
| @@ -0,0 +1,56 @@ | |||
| #!/bin/env pwsh | |||
| Write-Host "PR #$prNumber labels: $($prLabels -join ', ')" | ||
| } | ||
| catch { | ||
| Write-Warning "Failed to fetch PR labels from GitHub API: $_" |
|
|
||
| Push-Location $RepoRoot | ||
| try { | ||
| $changedFiles = git diff --name-only --diff-filter=A "origin/main...HEAD" 2>&1 |
| exit 0 | ||
| } | ||
|
|
||
| Write-Host "No changelog entry and no 'skip-changelog' label. If changelog entry is not required, add the 'skip-changelog' label to the PR to bypass this check. Or add a changelog entry TO the PR." |
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.
What does this PR do?
Adds changelog verification so PRs must either include a changelog entry or carry the
skip-changeloglabel.This change updates the Build pipeline to authenticate to GitHub for PR repos, invokes a new
Test-ChangelogEntry.ps1validation step fromAnalyze-Code.ps1, and adds the new script that checks changed files for changelog entries and falls back to validating the PR label through the GitHub REST API.GitHub issue number?
#2495
Pre-merge Checklist
servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationREADME.mdchanges running the script./eng/scripts/Process-PackageReadMe.ps1. See Package READMEToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.jsonbreaking-changelabelservers/Azure.Mcp.Server/docs/azmcp-commands.md./eng/scripts/Update-AzCommandsMetadata.ps1to update tool metadata inazmcp-commands.md(required for CI)servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline