-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add a PostAction to support modifying Json files in CLI templates #29880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a PostAction to support modifying Json files in CLI templates #29880
Conversation
…gheysels/dotnet-sdk into frgh/feat/5831_json_postaction
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
return node; | ||
} | ||
|
||
private static IReadOnlyList<string> FindFilesAtOrAbovePath( |
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.
I could get rid of this code if we could have an overload of the FindFilesAtOrAbovePath
method that exists in the FileFindHelpers
class
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.
Feel free to open a PR on the Template Engine to add an over load for the FindFilesAtAbovePath
. We can keep this function here until the Template Engine PR is complete for the overloading function.
src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj
Outdated
Show resolved
Hide resolved
src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/AddJsonPropertyPostActionProcessor.cs
Show resolved
Hide resolved
Could you add post-action info to templating repo? |
src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/AddJsonPropertyPostActionProcessor.cs
Outdated
Show resolved
Hide resolved
looks good to me! |
So, that's a PR In another repository ? |
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.
Thank you for the contribution!
<PackageReference Include="Verify.XUnit" Version="19.8.0" /> | ||
<PackageReference Include="Verify.DiffPlex" Version="2.1.0" /> |
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.
similarly to FakeItEasy
, do not specify the versions here. They are managed by dependabot.
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.
Done!
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.
@fgheysels , it looks like you have the last step here:
https://github.com/dotnet/sdk/pull/29880/checks?check_run_id=13200057848
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.
Yes, I had to verify something with my employer. Done now.
src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/AddJsonPropertyPostActionProcessor.cs
Show resolved
Hide resolved
I've cloned the wiki locally and added some documentation for the new postaction. So, any help here is appreciated :) |
You need to fork the repo , commit changes and create PR from the fork to dotnet/templating repo. |
I've done that. However, when you fork a repo, the wiki is not forked with it. However, I cannot create a PR as the changes to the wiki are not taken into account when creating a PR. The wiki is a separate repository, so that makes sense. There doesn't seem to be an option to create a PR for the wiki repo. |
@dotnet-policy-service agree |
Please point me to the changes in your fork and I will transfer them to our repo. |
Looks like you also cannot find the commit on the wiki repo. |
The DotnetModifyJsonPostActionProcessor PostAction allows dotnet template authors to modify JSON (existing) JSON files when creating a new project.