Recovered: feat: support TESTSPRITE_PROJECT_ID default (#144 by @naufalfx805-source)#249
Conversation
WalkthroughThe CLI now falls back to ChangesProject ID fallback
Possibly related issues
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed: private package registry requires authentication. Disable ESLint in CodeRabbit settings or use public packages. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/commands/test.ts`:
- Around line 7471-7475: Update the test run --all command’s option description
and usage examples to state that the project ID may come from --project or
TESTSPRITE_PROJECT_ID, including that the explicit --project value takes
precedence. Keep the requireProjectId validation in the handler aligned with
this documented behavior and ensure user-facing help no longer says --project is
mandatory.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b27c056e-6cd7-4f12-b55c-1a32d6a73d49
📒 Files selected for processing (4)
DOCUMENTATION.mdsrc/commands/test.run.spec.tssrc/commands/test.test.tssrc/commands/test.ts
| const projectId = resolveProjectId(cmdOpts.project, deps); | ||
| requireProjectId( | ||
| projectId, | ||
| '--all requires a project id - pass --project <id> or set TESTSPRITE_PROJECT_ID', | ||
| ); |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Update test run --all help text for the environment fallback.
The handler now accepts --project or TESTSPRITE_PROJECT_ID, but the command descriptions still say --project is required. This contradicts the new validation behavior and hides the supported environment-based invocation; update the option description and examples to mention both sources and flag precedence.
As per path instructions, CLI correctness includes clear user-facing error and usage behavior.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/commands/test.ts` around lines 7471 - 7475, Update the test run --all
command’s option description and usage examples to state that the project ID may
come from --project or TESTSPRITE_PROJECT_ID, including that the explicit
--project value takes precedence. Keep the requireProjectId validation in the
handler aligned with this documented behavior and ensure user-facing help no
longer says --project is mandatory.
Source: Path instructions
|
Hi @naufalfx805-source 👋 — this is the recovery of your PR #144 , which was auto-closed by an error in our 2026-07-09 release process. Your commits are intact — thank you for the contribution! It currently shows merge conflicts because Option A — merge (no force-push): git checkout BRANCH
git fetch upstream # your remote for TestSprite/testsprite-cli (may be "origin")
git merge upstream/main # resolve conflicts, commit
git pushOption B — rebase (cleaner history, needs force): git checkout BRANCH
git fetch upstream
git rebase upstream/main # resolve conflicts
git push --force-with-leaseOnce you push, the conflicts here resolve automatically and we'll take it into review. Sorry again for the extra step! |
Refs #76
Discord: npall_805
Summary:
Validation:
Summary by CodeRabbit
New Features
TESTSPRITE_PROJECT_IDas the default project for test listing, creation, and running all tests.--projectvalues continue to take precedence over the environment setting.Documentation
TESTSPRITE_PROJECT_IDand its supported command usage.