Skip to content

Pass repo description via env var to prevent special characters breaking PSD1 manifest#139

Merged
marko-stanojevic merged 2 commits intomainfrom
copilot/fix-single-quote-psd1-formatting
Apr 7, 2026
Merged

Pass repo description via env var to prevent special characters breaking PSD1 manifest#139
marko-stanojevic merged 2 commits intomainfrom
copilot/fix-single-quote-psd1-formatting

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 6, 2026

Direct interpolation of ${{ needs.get_repo_state.outputs.description }} into the PowerShell run block causes the bootstrap to fail when the description contains special characters — single quotes produce malformed PSD1, double quotes break the script entirely.

Change

bootstrap.yml — Generate new module manifest step

Pass the description as an environment variable instead of inline script interpolation:

# Before
- name: Generate new module manifest
  shell: pwsh
  run: |
    $Params = @{
      Description = "${{ needs.get_repo_state.outputs.description }}"
    }

# After
- name: Generate new module manifest
  shell: pwsh
  env:
    REPO_DESCRIPTION: ${{ needs.get_repo_state.outputs.description }}
  run: |
    $Params = @{
      Description = $env:REPO_DESCRIPTION
    }

New-ModuleManifest receives the raw string via $env:REPO_DESCRIPTION and handles PSD1 escaping correctly (e.g. it's a module'it''s a module'). No script syntax is at risk regardless of description content.

…1 +semver: fix

Agent-Logs-Url: https://github.com/WarehouseFinds/PSScriptModule/sessions/c50c8433-3111-4971-8626-d750bacdb404

Co-authored-by: marko-stanojevic <18008492+marko-stanojevic@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix single quote breaking PSD1 formatting fix: pass repo description via env var to prevent special characters breaking PSD1 manifest Apr 6, 2026
Copilot AI requested a review from marko-stanojevic April 6, 2026 18:38
Copy link
Copy Markdown
Contributor

@marko-stanojevic marko-stanojevic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean

@marko-stanojevic marko-stanojevic marked this pull request as ready for review April 7, 2026 16:02
@marko-stanojevic marko-stanojevic changed the title fix: pass repo description via env var to prevent special characters breaking PSD1 manifest Pass repo description via env var to prevent special characters breaking PSD1 manifest Apr 7, 2026
@marko-stanojevic marko-stanojevic merged commit 4ea3ca2 into main Apr 7, 2026
10 checks passed
@marko-stanojevic marko-stanojevic deleted the copilot/fix-single-quote-psd1-formatting branch April 7, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Github description containing (') single quote breaks PSD1 formatting

2 participants