-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
We have 2 human based tasks in the .NET SDK repository which are very automatable.
One task is to 'update xlf files' which is to update the translation files. When you change a base translation file, such as src/Cli/dotnet/CliStrings.resx, the other files, such as src/Cli/dotnet/xlf/CliStrings.cs.xlf, become invalid. The base dotnet sdk build updates those files automatically when you successfully build. Please refer to the existing rules for how to properly clone and build the SDK repo. We can generally use the 'build' command provided by the repo to do this after cloning. Some details were provided to copilot here : #51009. Better yet, you may be able to get it to work just doing msbuild /t:UpdateXlf
which will be faster. Here is an example of an 'Update XLF' commit: edbb8dd.
The next task is to 'update completions tests.' The dotnet completions tests have before and after text files, and the old file is considered correct. We automated this to some degree. An MS Build target renames the .received
. files to .verified
. in the local snapshots directory, and so acts as a giant 'I accept these changes' button. An example of a change list commit of that is provided here: 2d10a8f
The snapshot commands can be utilized like so from the Test
directory, only after running the tests first to generate the new file:
dotnet restore .\dotnet.Tests\ /t:CompareCliSnapshots & dotnet restore .\dotnet.Tests\ /t:UpdateCliSnapshots
What we need to do is enable a github actions workflow to do these tasks for us from the github website. This makes it so we don't need to clone the pull request again, and run the build to update xlf and push, in the xlf case. In the completions case, it makes it so we don't need to clone the branch, build, run the specific tests, then run the completions target. Generally, we look at the diff but they should be correct if automated.
When someone types /updatexlf into a github comment, the action and workflow should clone and run the task to fix the xlf files. It should then suggestion the changes it found as edit suggestion comments to the corresponding PR. https://github.com/parkerbxyz/suggest-changes
Something similar should be done with the completions test via a github command by typing /fixcompletions.