Skip to content
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

Autogenerated Module Readme does not include the PowerShell or Puppet Module Names #153

Closed
8 tasks done
michaeltlombardi opened this issue May 26, 2021 · 1 comment · Fixed by #163
Closed
8 tasks done
Assignees
Labels
bug Something isn't working

Comments

@michaeltlombardi
Copy link

michaeltlombardi commented May 26, 2021

Describe the Bug

The autogenerated module readmes should include:

  • the Puppet Module name as the first level header
  • The PowerShell module name and link to the module in several places (link depends on the name)

This is because New-PuppetDscModule calls Update-PuppetModuleReadme without passing either the $PowerShellModuleName or $PuppetModuleName parameters:

Update-PuppetModuleReadme -PuppetModuleFolderPath $PuppetModuleRootFolderDirectory -PowerShellModuleManifestPath $PowerShellModuleManifestPath

Those values need to be passed to Update-PuppetModuleReadme as that function uses them when calling Get-ReadmeContent:

$ReadmeParameters = @{
PowerShellModuleName = $PowerShellModuleName
PowerShellModuleDescription = $PowerShellMetadata.Description
PowerShellModuleGalleryUri = "https://www.powershellgallery.com/packages/$PowerShellModuleName/$($PowerShellMetadata.ModuleVersion)"
PowerShellModuleProjectUri = $PowerShellMetadata.PrivateData.PSData.ProjectUri
PowerShellModuleVersion = $PowerShellMetadata.ModuleVersion
PuppetModuleName = $PuppetModuleName
}
$ReadmeContent = Get-ReadmeContent @ReadmeParameters

Where they are then used several times:

Acceptance Criteria

  • The call to Update-PuppetModuleReadme in New-PuppetDscModule includes the missing parameters
  • All of the parameters in Update-PuppetModuleReadme are marked as mandatory and validation prevents passing null or empty values
    • convert from [string] to [Parameter(Mandatory=$true)][ValidateNotNullOrEmpty()][String]
  • Additional unit tests for when Update-PuppetModuleReadme is passed null and empty string values
  • The $PowerShellModuleName and $PuppetModuleName parameters in Get-ReadmeContent are marked as mandatory and validation prevents passing null or empty values for any parameter
    • convert from [string] to [Parameter(Mandatory=$true)][ValidateNotNullOrEmpty()][String]
  • Additional unit tests for when Get-ReadmeContent is passed null and empty string values for $PowerShellModuleName and $PuppetModuleName
  • Changelog Fixed Entries:
    • Entry clarifying fixes for auto-generated readmes
    • Entry clarifying improved UX to prevent failed behavior when passing null/empty strings to Update-PuppetModuleReadme
    • Entry clarifying improved UX to prevent failed behavior when passing null/empty strings to Get-ReadmeContent
@michaeltlombardi michaeltlombardi added the bug Something isn't working label May 26, 2021
@michaeltlombardi michaeltlombardi added this to the 002: End to End Testing milestone May 26, 2021
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 2, 2021
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 2, 2021
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 2, 2021
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 2, 2021
This commit corrects a bug where the auto-generated readme
was missing the PowerShell and Puppet module names from
various locations in the output markdown.

Those values were not being passed by New-PuppetDscModule
to Update-PuppetModuleReadme.

This commit also updates tests to ensure the values are passed.

Resolves puppetlabs#153
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 2, 2021
This commit corrects a bug where the auto-generated readme
was missing the PowerShell and Puppet module names from
various locations in the output markdown.

Those values were not being passed by New-PuppetDscModule
to Update-PuppetModuleReadme.

This commit also updates tests to ensure the values are passed.

Resolves puppetlabs#153
@david22swan
Copy link
Member

In regards to the setting of $PuppetModuleName as mandatory, have decided to forgo this as code exists to use the $PowerShellModuleName in it's place if it was not given.

david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 3, 2021
This commit corrects a bug where the auto-generated readme
was missing the PowerShell and Puppet module names from
various locations in the output markdown.

Those values were not being passed by New-PuppetDscModule
to Update-PuppetModuleReadme.

This commit also updates tests to ensure the values are passed.

Resolves puppetlabs#153
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 3, 2021
This commit corrects a bug where the auto-generated readme
was missing the PowerShell and Puppet module names from
various locations in the output markdown.

Those values were not being passed by New-PuppetDscModule
to Update-PuppetModuleReadme.

This commit also updates tests to ensure the values are passed.

Resolves puppetlabs#153
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 3, 2021
This commit corrects a bug where the auto-generated readme
was missing the PowerShell and Puppet module names from
various locations in the output markdown.

Those values were not being passed by New-PuppetDscModule
to Update-PuppetModuleReadme.

This commit also updates tests to ensure the values are passed.

Resolves puppetlabs#153
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 3, 2021
This commit corrects a bug where the auto-generated readme
was missing the PowerShell and Puppet module names from
various locations in the output markdown.

Those values were not being passed by New-PuppetDscModule
to Update-PuppetModuleReadme.

This commit also updates tests to ensure the values are passed.

Resolves puppetlabs#153
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 3, 2021
This commit corrects a bug where the auto-generated readme
was missing the PowerShell and Puppet module names from
various locations in the output markdown.

Those values were not being passed by New-PuppetDscModule
to Update-PuppetModuleReadme.

This commit also updates tests to ensure the values are passed.

Resolves puppetlabs#153
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 3, 2021
This commit corrects a bug where the auto-generated readme
was missing the PowerShell and Puppet module names from
various locations in the output markdown.

Those values were not being passed by New-PuppetDscModule
to Update-PuppetModuleReadme.

This commit also updates tests to ensure the values are passed.

Resolves puppetlabs#153
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 3, 2021
This commit corrects a bug where the auto-generated readme
was missing the PowerShell and Puppet module names from
various locations in the output markdown.

Those values were not being passed by New-PuppetDscModule
to Update-PuppetModuleReadme.

This commit also updates tests to ensure the values are passed.

Resolves puppetlabs#153
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 3, 2021
This commit corrects a bug where the auto-generated readme
was missing the PowerShell and Puppet module names from
various locations in the output markdown.

Those values were not being passed by New-PuppetDscModule
to Update-PuppetModuleReadme.

This commit also updates tests to ensure the values are passed.

Resolves puppetlabs#153
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 3, 2021
This commit corrects a bug where the auto-generated readme
was missing the PowerShell and Puppet module names from
various locations in the output markdown.

Those values were not being passed by New-PuppetDscModule
to Update-PuppetModuleReadme.

This commit also updates tests to ensure the values are passed.

Resolves puppetlabs#153
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 3, 2021
This commit corrects a bug where the auto-generated readme was missing the PowerShell and Puppet module names from various locations in the output markdown.
Those values were not being passed by New-PuppetDscModule to Update-PuppetModuleReadme.
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 3, 2021
…-PuppetModuleReadme`

Makes all `Update-PuppetModuleReadme` parameters except `PuppetModuleName` mandatory and do not accept null or empty values.
PuppetModuleName` is excluded from this change as it is handled by a separate set of logic that uses the `PowerShellModuleName` in its place should it not be set or be set as an empty string.
david22swan added a commit to david22swan/Puppet.Dsc that referenced this issue Jun 3, 2021
…mecontent`

Makes the `PowerShellModuleName` and `PuppetModuleName` parameters in `Get-Readmecontent` mandatory and rejects null or empty values for any parameters
michaeltlombardi added a commit that referenced this issue Jun 4, 2021
(GH-153) Ensure generated readme contains module name info
@michaeltlombardi michaeltlombardi removed this from the 002: End to End Testing & 1.0.0 Release milestone Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants