-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Nagilson nagilson cplt wrkfl #52117
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
Nagilson nagilson cplt wrkfl #52117
Conversation
Co-authored-by: nagilson <[email protected]>
Co-authored-by: nagilson <[email protected]>
Co-authored-by: nagilson <[email protected]>
Co-authored-by: nagilson <[email protected]>
Co-authored-by: nagilson <[email protected]>
Co-authored-by: nagilson <[email protected]>
Co-authored-by: nagilson <[email protected]>
This reverts commit 2c87579.
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
This PR adds automated GitHub Actions workflows that allow maintainers to update translation files and CLI completion snapshots directly from pull request comments. The workflows respond to /updatexlf and /fixcompletions commands, eliminating the need to clone branches locally for these common maintenance tasks.
Key Changes
- Added two comment-triggered GitHub Actions workflows for automated PR maintenance
- Updated documentation to describe the new
/updatexlfand/fixcompletionscommands - Workflows automatically build, test, update files, and commit changes back to the PR branch
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/update-xlf-on-comment.yml |
New workflow that runs UpdateXlf build target and commits updated translation files when /updatexlf is commented on a PR |
.github/workflows/fix-completions-on-comment.yml |
New workflow that runs completion tests, updates snapshot files, and commits them when /fixcompletions is commented on a PR |
documentation/project-docs/snapshot-based-testing.md |
Added section documenting the /fixcompletions workflow with usage instructions |
documentation/project-docs/developer-guide.md |
Added "Automated PR Maintenance Commands" section documenting both /updatexlf and /fixcompletions workflows |
documentation/project-docs/Localization.md |
Added section documenting the /updatexlf workflow for updating translation files |
| id: compare | ||
| if: steps.test.outcome != 'skipped' | ||
| run: | | ||
| dotnet restore test/dotnet.Tests/ /t:CompareCliSnapshots |
Copilot
AI
Dec 10, 2025
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.
The dotnet restore command is being used with MSBuild targets /t:CompareCliSnapshots, but dotnet restore doesn't accept MSBuild target parameters in this way. This should be dotnet build or dotnet msbuild instead.
| if: steps.check-changes.outputs.changes == 'true' | ||
| run: | | ||
| # This renames .received.* files to .verified.* | ||
| dotnet restore test/dotnet.Tests/ /t:UpdateCliSnapshots |
Copilot
AI
Dec 10, 2025
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.
The dotnet restore command is being used with MSBuild target /t:UpdateCliSnapshots, but dotnet restore doesn't accept MSBuild target parameters in this way. This should be dotnet build or dotnet msbuild instead.
| dotnet restore test/dotnet.Tests/ /t:UpdateCliSnapshots | |
| dotnet msbuild test/dotnet.Tests/ /t:UpdateCliSnapshots |
| if: steps.compare.outcome == 'success' | ||
| run: | | ||
| # Check if there are changes to snapshot files | ||
| if git diff --name-only test/dotnet.Tests/CompletionTests/snapshots/ | grep -E '\.received\.'; then |
Copilot
AI
Dec 10, 2025
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.
The grep pattern \.received\. will fail when there are no matching files, causing the conditional to incorrectly report false. Consider using grep -qE '\.received\.' with an || true suffix, or restructure to use git diff --name-only | grep -qE '\.received\.' && echo "changes=true" || echo "changes=false".
| if git diff --name-only test/dotnet.Tests/CompletionTests/snapshots/ | grep -E '\.received\.'; then | |
| if git diff --name-only test/dotnet.Tests/CompletionTests/snapshots/ | grep -qE '\.received\.'; then |
| if: steps.check-changes.outputs.changes == 'true' | ||
| run: | | ||
| # This renames .received.* files to .verified.* | ||
| dotnet restore test/dotnet.Tests/ /t:UpdateCliSnapshots |
Copilot
AI
Dec 10, 2025
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.
This step uses the system dotnet instead of the repo-local ./.dotnet/dotnet that was built in the previous step. For consistency with the test step (line 55), consider using ./.dotnet/dotnet here as well.
| dotnet restore test/dotnet.Tests/ /t:UpdateCliSnapshots | |
| ./.dotnet/dotnet restore test/dotnet.Tests/ /t:UpdateCliSnapshots |
No description provided.