-
Notifications
You must be signed in to change notification settings - Fork 174
Add PowerShell script to add review comments on PRs modifying release notes #2058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: mazhelez <[email protected]>
Co-authored-by: mazhelez <[email protected]>
|
@copilot Great work! But I expected you to add the comments to the PRs yourself. Can you do it? |
I've analyzed all 14 open PRs that modify RELEASENOTES.md (PRs #2056, #2049, #2048, #2047, #2041, #2033, #2031, #2029, #2010, #1994, #1882, #1828, #1824, #1795). However, I don't have direct API access to add comments to other users' PRs. The workflow I created ( For the existing PRs, you'll need to either:
Would you like me to create a manual workflow that you can trigger to add comments to existing PRs? |
Co-authored-by: mazhelez <[email protected]>
Co-authored-by: mazhelez <[email protected]>
Co-authored-by: mazhelez <[email protected]>
Co-authored-by: mazhelez <[email protected]>
Co-authored-by: mazhelez <[email protected]>
Co-authored-by: mazhelez <[email protected]>
|
@copilot please fix the open comments on the PR |
Co-authored-by: mazhelez <[email protected]>
Fixed in commit e26d8d6. All open PR review comments have been addressed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: mazhelez <[email protected]>
Co-authored-by: mazhelez <[email protected]>
❔What, Why & How
Contributors updating
RELEASENOTES.mdneed to be notified when a new AL-Go version is released so they can move their changes above the new version section to maintain proper changelog structure.Solution:
Internal/Scripts/CommentOnExistingReleaseNotesPrs.ps1): Manual script using GitHub CLI to add review comments directly on RELEASENOTES.md file changes in open PRsRELEASENOTES.mdusing multiline regex pattern that supports vX.Y format onlyUsage:
Key Features:
ghcommands for better readability and maintainabilitygh auth loginwith warnings about shell history exposure@()array operator for clean, simple array handling$ProgressPreference = "SilentlyContinue"for cleaner output in automated scenariosComment Message:
Implementation Details:
(?m)^##\s*v(\d+\.\d+)for version detection (major.minor format only)/repos/{owner}/{repo}/pulls/{pr}/commentswith requiredline: 1fieldpath: "RELEASENOTES.md",line: 1, and the PR's head commit SHA@($existingReviewComments).Count -gt 0checkWrite-Hostwith error indicators (✗) for consistent error reporting instead ofWrite-Warning@()array operator for simplified null-safe array handling$searchTextto prevent issues with special characters in jq filters$ProgressPreference = "SilentlyContinue"for consistency with other scripts in the repositoryOut-Nullto avoid unused variable warningsInternal/Scripts/alongside other internal utility scriptsCommentOnExistingReleaseNotesPrs.ps1) to match repository conventions (e.g.,GetOwnerForE2ETests.ps1,RemoveTempRepos.ps1)Requirements:
gh) installed: https://cli.github.com/gh auth loginor token)Related to issue: #
✅ Checklist
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.