Skip to content

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

Open
z-Fng wants to merge 1 commit into
ScoopInstaller:mainfrom
z-Fng:allow-empty-issue-body
Open

fix: avoid validation error when issue body is empty#80
z-Fng wants to merge 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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c846e1e1-807c-4284-9615-b2ef2e81ac45

📥 Commits

Reviewing files that changed from the base of the PR and between 63f20ef and 7fdd68e.

📒 Files selected for processing (1)
  • src/Action/Issue/Extraction.psm1

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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.

✏️ 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.

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.

1 participant