Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

Conversation

@AdithyaGauravCanarys
Copy link
Contributor

This pull request introduces several changes to improve file handling, error handling, and HTTP response parsing in the ADOGenerator and ProjectsAndTeams modules. Key updates include better handling of paths and template updates, enhanced error reporting for file operations, and replacing ReadFromJsonAsync with JsonConvert.DeserializeObject for HTTP response parsing.

Improvements to file handling and error reporting:

  • Updated HandleTemplateAndArtifactsUpdate in src/ADOGenerator/Program.cs to check if the template path matches the original path and added a prompt for updating settings. Improved error handling in CopyFileIfExists by wrapping file operations in a try-catch block. [1] [2] [3] [4]
  • Added logic to ensure paths ending with "ADOGenerator" are correctly formatted in Program.cs and ExtractorService.cs. [1] [2]

HTTP response parsing updates:

  • Replaced ReadFromJsonAsync with JsonConvert.DeserializeObject in multiple methods in src/API/ProjectsAndTeams/Teams.cs for deserializing HTTP responses, improving compatibility and error handling. [1] [2] [3] [4] [5]

This issue fixes: #59

Refactor `Program.cs` and `ExtractorService.cs` to work with exe file as well as with Editor.

Refactor `Program.cs` to enhance user experience with additional checks for template settings updates. Implement error handling in `CopyFileIfExists` using try-catch blocks. Update `ExtractorService.cs` to ensure `currentPath` includes a check for the "ADOGenerator" directory. Modify `Teams.cs` to read JSON responses as strings before deserialization for better control and error handling. Overall, these changes improve the robustness and clarity of the application.
@akshay-online akshay-online merged commit f5802c5 into main Jun 18, 2025
4 checks passed
@akshay-online akshay-online deleted the artifact_project_creation_bug branch June 18, 2025 13:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-enable the old way of provisioning templates (including custom templates) through the Demo Generator website

3 participants