I am hoping to bulk generate 50 xml transformation using github copilot. have worked out prompt and checked the generated copilot response is good. basically, I feed both input xml and expected output xml file to copilot chat, and asked for a xslt transformation, then save the xslt to a new file. the work is for a migration project.
now, the drama is how to bulk produce the xslt using copilot.. it will take me forever to carry out above manual actions using copilot chat. I have looked at gh copilot cli, it does not seem able to do what copilot chat can do, more for interactive mode. gh copilot only has ask or explain actions.
Surely i can hook up openai to do so but just wonder if you know a better way to do so in github copilot. org policy only allows us to use github copilot for now.
You have 2 options for this solution, both relying to GitHub Copilot advanced features instead of GitHub Copilot built-in function
The GitHub Models will allow you to use Azure OpenAI via Restful, so consider if your task solving up to 50 files only or intended for more than hundreds to thousands, you probably don't have another choice except using LLM to automate your task. I'm not quite sure if the feature is GA yet but you may need to join the waitlist. Once you joined you can benefit all requests with no extra charge as usual when you making request to either Azure OpenAI or OpenAI, absolutely it would have some limitation but still sufficient for your task.
The same with GitHub Models, you may need to join waitlist. This coolest feature will help you reading GitHub repository, brainstorming your problem and generating the plan to the code. For example:
I'll pick this public repository, including folder of XML Samples https://github.com/zynksoftware/samples/tree/master/XML%20Samples
Access https://copilot-workspace.githubnext.com/ or same name Extension in VSCode, pick the repo
I will start brainstorming firstly
It will prompt to current behavior and proposed behavior by Copilot
After that, you can generate the plan
Once you feel it's ok to go, click Implementation and wait for it
Finally, create PR for all 36 files are changed, you can check more here https://github.com/zhenyuan0502/samples/pull/1/files
If you can access Copilot Workspace, check more snapshot here https://copilot-workspace.githubnext.com/zynksoftware/samples?s=fc07, from my end the website keeps loading till memory out, so maybe it would be fixed in the future for preview these files online. Whereas the VS Code can download to local with no problem occured