Closed phbits closed 3 years ago
Merging #76 (424a333) into main (3a8ba11) will decrease coverage by
0%
. The diff coverage is100%
.
@@ Coverage Diff @@
## main #76 +/- ##
==================================
- Coverage 97% 97% -1%
==================================
Files 34 34
Lines 782 802 +20
==================================
+ Hits 765 784 +19
- Misses 17 18 +1
I will review this a day when I have more time. π But a quick view it looks like a good addition!
Found tests in the following are failing and will fix in the next day or two.
DscResource.DocGenerator\tests\unit\public\Publish-WikiContent.Tests.ps1
I will try to get to this one this weekend.
I will try to get to this one this weekend.
Before looking into this PR, I'd like to run something past you. There's another git
call in this module:
# tasks/Publish_GitHub_Wiki_Content.build.ps1:170
$remoteURL = git remote get-url origin
If Invoke-Git
is modified to return an object, it could be reused for the above instance and any future git
uses.
return @{
ExitCode = $process.ExitCode
StandardOutput = $process.StandardOutput.ReadToEnd()
StandardError = $process.StandardError.ReadToEnd()
}
Would you be interested in taking this approach? Perhaps something entirely different?
If we have a private function Invoke-Git
that calls git
then I think all calls should use the same function. π
If we have a private function
Invoke-Git
that callsgit
then I think all calls should use the same function. π
Sounds good. π This approach will be a significant change from this PR. Would you prefer to have it submitted separately?
Yes do it separately in another PR so it is easier to review. :)
Closing PR.
Did you close this by mistake? My thought was continue with this PR and merge it, then make a new PR with the suggestion to replace βgitβ with Invoke-Git in all other places. Just want to make sure I did not missunderstood π
No, didn't close it by mistake. π I incorporated all the changes and proposed fixes from this PR into a new branch. Just opened a new PR #80 so you can take a look. Figured this would be easier/cleaner given that we both agreed on the new direction.
That being said... err, typed, since you're the maintainer I'll leave it up to you for how you want to proceed. π
It is easier for me to continue review on this PR (branch) otherwise I need to re-review everything again. Any additional changes to other files that you proposed, that was not part of this PR, can be pushed in another PR. π
So please continue to fix the review comments on this PR.
Pull Request (PR) description
In a prior project, I came across AuditPolicyDsc which uses
System.Diagnostics.Process
to launchauditpol.exe
(ref: AuditPolicyResourceHelper.psm1) as it provides more flexibility with handling error conditions. Thus converting this module is the first step toward improving error handling as mentioned in Issue #75.I liked the readability of
Publish-WikiContent
and why I opted to pass the WorkingDirectory as the first argument. This leads to another benefit of not having to useSet-Location
and similar commands.This Pull Request (PR) fixes the following issues
Task list
This change isβ