Skip to content

fix: avoid validation error when issue body is empty#80

Merged
chawyehsu merged 1 commit into
ScoopInstaller:mainfrom
z-Fng:allow-empty-issue-body
May 21, 2026
Merged

fix: avoid validation error when issue body is empty#80
chawyehsu merged 1 commit into
ScoopInstaller:mainfrom
z-Fng:allow-empty-issue-body

Conversation

@z-Fng
Copy link
Copy Markdown
Member

@z-Fng z-Fng commented May 15, 2026

Motivation

[Parameter(Mandatory = $true)]
[string] $IssueBody

The mandatory parameter validation was failing because the issue body could be empty.

INFO: Issue initialized
Detected issue type: Decompression/Extraction error.
Show-ExtractionHelpDoc: Cannot bind argument to parameter 'IssueBody' because it is an empty string.
INFO: Issue finished

Related Issues/PRs

Summary by CodeRabbit

Release Notes

  • Enhancements
    • Improved parameter handling to accept empty string values in issue body field processing.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Walkthrough

The IssueBody parameter in Show-ExtractionHelpDoc now has the [AllowEmptyString()] attribute, which changes PowerShell parameter-binding behavior to explicitly permit empty-string input rather than treating it as missing.

Changes

IssueBody Parameter Enhancement

Layer / File(s) Summary
Allow empty-string binding for IssueBody parameter
src/Action/Issue/Extraction.psm1
The IssueBody parameter of Show-ExtractionHelpDoc gains [AllowEmptyString()] attribute to enable empty-string input handling.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • ScoopInstaller/GithubActions#78: Both PRs modify src/Action/Issue/Extraction.psm1's Show-ExtractionHelpDoc handling of the IssueBody input (one changes the IssueBody parameter binding via [AllowEmptyString()], the other adjusts how $IssueBody drives the help/tip content).

Poem

🐰 A string so empty, yet so fine,
Now AllowEmptyString makes it mine!
Parameter binding, crisp and clear,
The PowerShell magic is here!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: avoid validation error when issue body is empty' directly and clearly summarizes the main change—adding [AllowEmptyString()] to the IssueBody parameter to permit empty strings and prevent validation errors.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Stopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a @coderabbit review after the pipeline has finished.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@z-Fng
Copy link
Copy Markdown
Member Author

z-Fng commented May 20, 2026

cc: @chawyehsu

@chawyehsu chawyehsu merged commit e174c3b into ScoopInstaller:main May 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants