This repository was archived by the owner on Jul 21, 2025. It is now read-only.
Fix: Ensure compatibility for work item file paths using Path.GetFile…#45
Merged
gloridelmorales merged 1 commit intomicrosoft:mainfrom Apr 17, 2025
Merged
Conversation
…Name for cross-platform support
Contributor
Author
|
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Pull Request Overview
This PR enhances cross-platform compatibility in the CreateProjectEnvironment method by updating file path extraction and tidying up legacy code.
- Replaced manual path splitting with the cross-platform Path.GetFileName method
- Removed legacy commented-out code to improve readability
- Cleaned up formatting and adjusted using directives for clarity
Comments suppressed due to low confidence (1)
src/ADOGenerator/Services/ProjectService.cs:553
- [nitpick] Local variable '_WitPath' uses an underscore prefix, which is typically reserved for private fields. Consider renaming it to 'witPath' for improved consistency.
string _WitPath = GetJsonFilePath(model.IsPrivatePath, model.PrivateTemplatePath, templateUsed, "WorkItems");
gloridelmorales
approved these changes
Apr 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request makes improvements to the
CreateProjectEnvironmentmethod in theProjectServiceclass for better code clarity and cross-platform compatibility. It also includes a minor change to theusingdirectives. Below is a summary of the most important changes:Code clarity and maintainability:
Path.GetFileNameto extract the file name from a path, ensuring cross-platform compatibility. (src/ADOGenerator/Services/ProjectService.cs, src/ADOGenerator/Services/ProjectService.csL554-R561)src/ADOGenerator/Services/ProjectService.cs, src/ADOGenerator/Services/ProjectService.csL578-L584)Minor formatting and cleanup:
src/ADOGenerator/Services/ProjectService.cs, src/ADOGenerator/Services/ProjectService.csL606)usingdirectives without functional impact. (src/ADOGenerator/Services/ProjectService.cs, src/ADOGenerator/Services/ProjectService.csL1-R1)…Name for cross-platform support