Skip to content

CLI: Fix access to getOptionValue in postAction hook#33119

Merged
valentinpalkovic merged 1 commit into
nextfrom
valentin/fix-getOptionValue-access
Nov 21, 2025
Merged

CLI: Fix access to getOptionValue in postAction hook#33119
valentinpalkovic merged 1 commit into
nextfrom
valentin/fix-getOptionValue-access

Conversation

@valentinpalkovic
Copy link
Copy Markdown
Contributor

@valentinpalkovic valentinpalkovic commented Nov 21, 2025

Closes #

What I did

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This pull request has been released as version 0.0.0-pr-33119-sha-f97b6fcf. Try it out in a new sandbox by running npx storybook@0.0.0-pr-33119-sha-f97b6fcf sandbox or in an existing project with npx storybook@0.0.0-pr-33119-sha-f97b6fcf upgrade.

More information
Published version 0.0.0-pr-33119-sha-f97b6fcf
Triggered by @valentinpalkovic
Repository storybookjs/storybook
Branch valentin/fix-getOptionValue-access
Commit f97b6fcf
Datetime Fri Nov 21 13:41:01 UTC 2025 (1763732461)
Workflow run 19572322280

To request a new release of this pull request, mention the @storybookjs/core team.

core team members can create a new canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=33119

Summary by CodeRabbit

  • Refactor
    • Optimized internal command-line argument processing for improved consistency. Logging functionality remains unchanged—users can continue writing logs to file when enabled.

✏️ Tip: You can customize this high-level summary in your review settings.

@valentinpalkovic valentinpalkovic self-assigned this Nov 21, 2025
@valentinpalkovic valentinpalkovic added bug cli ci:normal Run our default set of CI jobs (choose this for most PRs). labels Nov 21, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 21, 2025

📝 Walkthrough

Walkthrough

The postAction hook callback signature was updated to receive the full command object instead of destructured parameters. The log file path retrieval was adjusted to access the logfile option through command.getOptionValue('logfile') instead of the previously destructured value.

Changes

Cohort / File(s) Summary
postAction hook parameter refactoring
code/core/src/bin/core.ts
Updated postAction callback to accept the full command object; adjusted logfile option access to use command.getOptionValue('logfile') instead of destructured parameter while maintaining existing log-writing behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Straightforward parameter passing refactor with minimal logic changes
  • Single file affected with localized modifications
✨ Finishing touches
  • 📝 Generate docstrings

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c1faf97 and f97b6fc.

📒 Files selected for processing (1)
  • code/core/src/bin/core.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
code/core/src/bin/core.ts (1)
code/core/src/node-logger/logger/log-tracker.ts (1)
  • logTracker (97-97)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: normal
  • GitHub Check: Core Unit Tests, windows-latest

Comment thread code/core/src/bin/core.ts
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Nov 21, 2025

View your CI Pipeline Execution ↗ for commit f97b6fc

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 44s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-21 14:01:08 UTC

@valentinpalkovic valentinpalkovic merged commit a0e40e2 into next Nov 21, 2025
68 of 72 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/fix-getOptionValue-access branch November 21, 2025 14:05
@github-actions github-actions Bot mentioned this pull request Nov 23, 2025
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug ci:normal Run our default set of CI jobs (choose this for most PRs). cli

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants