-
Notifications
You must be signed in to change notification settings - Fork 193
Conversation
- Added `UpgradeLog.htm` to `.gitignore`. - Updated `ADOGenerator.csproj` to include `ExtractedTemplate` folder and ensure files are copied to output. - Modified `ITemplateService` to change `StartEnvironmentSetupProcess` to `GenerateTemplateArtifacts`, returning a tuple. - Improved user interaction in `Program.cs` with JSON handling and better project creation logic. - Refactored `ExtractorService` for improved path handling and directory creation. - Enhanced `TemplateService` structure and error handling for project analysis and artifact generation. - Overall improvements to functionality, maintainability, and user experience.
- Updated `ADOGenerator.csproj` to ensure `appsettings.json` is always copied to the output directory. - Modified `IExtractorService` to remove several methods and add `extractedFolderName` parameter for improved file handling. - Enhanced `GenerateTemplateArtifacts` in `ITemplateService` to return the location of the generated template. - Restructured `Program.cs` for better user interaction and added color-coded console messages. - Introduced new helper methods for file management and template updates. - Updated `ExtractorService` and export methods to utilize the new folder structure. - Improved error handling and user feedback in `TemplateService`. - Overall, these changes streamline the generation and export of Azure DevOps templates and artifacts.
Refactored `IExtractorService` and `ITemplateService` to return `bool` for success/failure, added methods to check template existence. Improved user prompts and error handling in `Program.cs`, including better message formatting and clarity. Enhanced logging capabilities in `ServiceExtensions.cs`. Updated project selection output in `ProjectService.cs` for improved readability. Overall, these changes focus on enhancing user experience and error management throughout the application.
- Updated `.gitignore` to include `UpgradeLog.htm`. - Removed `Models\Configuration.cs` from `ADOGenerator.csproj`. - Introduced `IExtractorService` interface with methods for project configurations and exporting queries. - Added `GetProjects` and `SelectProject` methods in `IProjectService` for project retrieval and selection. - Enhanced `ITemplateService` with methods for project analysis and template existence checks. - Created `ExtractorAnalysis` class to hold analysis results. - Refactored `Program.cs` for improved user interaction and project management. - Added logging and error handling methods in `ServiceExtensions.cs`. - Improved organization selection prompts in `AuthService.cs`. - Expanded `ExtractorService` with methods for handling project configurations and exporting various entities. - Introduced a method in `Init.cs` to extract href links. - Updated `ProjectService.cs` to retrieve project details based on account information. - Refactored `TemplateService.cs` to include configuration and artifact generation methods. - Changed `GetWorkItemsCount.cs` to use `JsonConvert` for work item fetching.
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 enhances the ADOGenerator project by introducing new service interfaces for template and project analysis, improving logging/warning messages, and upgrading the user interface for project and organization selection. Key changes include new methods in ITemplateService and IExtractorService, improved error and warning logging via ServiceExtensions, and refactored project selection UI with enhanced text wrapping and alignment.
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/API/Extractor/GetWorkItemsCount.cs | Replaces ReadFromJsonAsync with JsonConvert for work item deserialization. |
| src/ADOGenerator/Services/TemplateService.cs | Adds project analysis, template existence checking, and artifact generation with logging improvements. |
| src/ADOGenerator/Services/ProjectService.cs | Introduces enhanced project retrieval and a formatted selection UI. |
| src/ADOGenerator/Services/AuthService.cs | Improves organization selection UI with color and wrapping. |
| src/ADOGenerator/ServiceExtensions.cs | Adds a WarningId extension and adjusts message color based on warning status. |
| src/ADOGenerator/Models/ExtractorAnalysis.cs | Introduces a data model to encapsulate analysis results. |
| Interface files under IServices | Define new service artifacts required for template and project analysis. |
Files not reviewed (1)
- src/ADOGenerator/ADOGenerator.csproj: Language not supported
Comments suppressed due to low confidence (1)
src/ADOGenerator/Services/TemplateService.cs:87
- The method name 'GenerateTemplateArifacts' appears to be misspelled. Consider renaming it to 'GenerateTemplateArtifacts' for clarity and consistency.
string[] createdTemplate = extractorService.GenerateTemplateArifacts(model);
| Projects projects = new Projects(config); | ||
| ProjectProperties.Properties load = projects.GetProjectProperties(); | ||
| model.ProcessTemplate = load.value[4].value; | ||
| ExtractorService es = new ExtractorService(_config); |
Copilot
AI
Apr 29, 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.
There is a redundant instantiation of ExtractorService here while the class already holds an instance via the 'extractorService' field. Consider reusing the existing instance to reduce unnecessary object creation.
| ExtractorService es = new ExtractorService(_config); |
This pull request introduces several changes to enhance the functionality of the
ADOGeneratorproject. The updates include the addition of new interfaces and methods for project analysis and template management, improved logging and error handling, and enhancements to the user interface for project and organization selection. Below is a summary of the most important changes grouped by theme:New Features and Interfaces:
IExtractorServiceinterface with methods for project configuration, team and iteration counts, and artifact generation (src/ADOGenerator/IServices/IExtractorService.cs).ITemplateServicewith methods for project analysis, template existence checks, and artifact generation (src/ADOGenerator/IServices/ITemplateService.cs).ExtractorAnalysisclass to encapsulate analysis results, including team counts, iteration counts, and error messages (src/ADOGenerator/Models/ExtractorAnalysis.cs).Enhancements to Template and Project Services:
TemplateServicewith methods for analyzing projects, checking template existence, and generating artifacts. Added logging for analysis results (src/ADOGenerator/Services/TemplateService.cs).ProjectServiceto include methods for retrieving and selecting projects, with added support for paginated and wrapped text in the console output (src/ADOGenerator/Services/ProjectService.cs).Logging and Error Handling Improvements:
WarningIdmethod inServiceExtensionsfor logging warnings and updatedAddMessageto display warnings in yellow (src/ADOGenerator/ServiceExtensions.cs). [1] [2]User Interface Enhancements:
src/ADOGenerator/Services/AuthService.cs).src/ADOGenerator/Services/ProjectService.cs).Code Simplification and Refactoring:
ReadFromJsonAsyncwithJsonConvert.DeserializeObjectfor deserializing work item details, improving compatibility (src/API/Extractor/GetWorkItemsCount.cs).Configuration.csfile from the project (src/ADOGenerator/ADOGenerator.csproj).