PowerShell / DscResource.Tests

Common meta tests for PowerShell DSC resources repositories.
MIT License
51 stars 49 forks source link

New WikiPages Function: Publish-WikiContent #324

Closed X-Guardian closed 5 years ago

X-Guardian commented 5 years ago

Pull Request (PR) description

This PR adds the following:

  1. A new WikiPages function Publish-WikiContent which publishes the contents of a DSC Resource Module Wiki Content artifact from an AppVeyor job to the relevant GitHub Wiki repository.
  2. An additional PublishWikiContent option to the Invoke-AppVeyorDeployTask OptIn parameter which if set, will call the Publish-WikiContent function with the relevant parameters.

To enable the function, the following process needs to be followed:

  1. Obtain a GitHub Personal Access Token with repo/public_repo permissions for a user that has at least Collaborator access to the relevant DSC Module GitHub repository.
  2. Make the following modifications to the appveyor.yml file of the relevant DSC Module GitHub repository:
    1. Add the Github Personal Access Token as a secure variable called github_access_token to the environment section.
    2. Add the PublishWikiContent OptIn property to the Invoke-AppVeyorDeployTask function call in the deploy_script section as follows:
deploy_script:
  - ps: |
        Invoke-AppVeyorDeployTask -Optin 'PublishExample', 'PublishWikiContent'

Notes

As an example, this fork of the xActiveDirectory repository has the Publish-WikiContent enabled, with this example Pull Request and AppVeyor build deploying the Wiki.

This Pull Request (PR) fixes the following issues

Task list


This change is Reviewable

codecov-io commented 5 years ago

Codecov Report

Merging #324 into dev will increase coverage by <1%. The diff coverage is 93%.

Impacted file tree graph

@@         Coverage Diff          @@
##            dev   #324    +/-   ##
====================================
+ Coverage    75%    75%   +<1%     
====================================
  Files        12     12            
  Lines      1581   1651    +70     
  Branches      2      2            
====================================
+ Hits       1186   1251    +65     
- Misses      393    398     +5     
  Partials      2      2
X-Guardian commented 5 years ago

I haven't added instructions to the README yet. I'll do that once everyone has reviewed the implementation details.

PlagueHO commented 5 years ago

Awesome stuff @X-Guardian! I haven't had a chance to do a full review on it, but a quick suggestion is to separate the strings into a localization file as per other modules. Will be great to get this in.

X-Guardian commented 5 years ago

Will do @PlagueHO.

johlju commented 5 years ago

@X-Guardian Awesome work on this! 😃

johlju commented 5 years ago

@PlagueHO can you sign off on this implementation (and maybe review) so that @X-Guardian can update the README.md. That is my only comment left, and after that this PR looks good to me.

X-Guardian commented 5 years ago

Did you see my comments on #227 and #228?

X-Guardian commented 5 years ago

Hi @PlagueHO . Have you had chance to look at this PR yet? It would be great to get this implemented.

PlagueHO commented 5 years ago

Hi @X-Guardian , @johlju - sorry for not completing this last night, I was flying home. I'm trying to sign off on the bus but reviewable isnt working on my phone.

:lgtm: