Repository navigation
[Hackathon] fix(schedule): echo environment and dates in updateSchedule dry-run sample - #584
Conversation
…ample Echo environment with environmentMode: 'pinned' when the PATCH body carries environment, and echo startAt and endAt when present in the updateSchedule dry-run sample. This prevents schedule update --env --dry-run from failing with an unsupportedEnvironmentError (exit 7). Fixes TestSprite#377
|
Caution Review failedThe pull request is closed. No actionable comments were generated in the recent review. WalkthroughThe schedule dry-run sample now returns inherited environment fields and echoes update environment and date values. Tests verify pinned environment output and ISO date normalization in text, JSON, and sample responses. ChangesSchedule update dry-run
Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk:
|
|
🏆 Season 4 CLI Improvement Bonus: entry recorded. Thanks, @grzdev! To be counted, this PR needs the following by Oct 29, 11:59 PM PT:
Rewards go to merged PRs judged a genuine improvement, and up to three bonus-eligible PRs count per person. Untick the box to withdraw the entry. This comment refreshes when you edit the PR. Full rules. |
What does this PR do?
Fixes an issue where previewing
schedule update --env <name> --dry-runfailed withUNSUPPORTED(exit 7) and an error claiming the server updated the schedule without confirming the pin, and where--start/--enddates were dropped from the dry-run output preview.Specifically:
src/lib/dry-run/samples.ts(updateSchedule), echoesenvironmenttogether withenvironmentMode: 'pinned'whenenvironmentis passed in the request body.startAtandendAtwhen present in the request body.src/commands/schedule.write.test.ts(runUpdatedry-run previewing env pin and start/end dates) andsrc/lib/dry-run/samples.test.ts(updateSchedulesample validation).Related issue
Fixes #377
Season 4 CLI Improvement Bonus
Discord username: 3raiden
Type of change
Checklist
mainbranch.feat(...),fix(...),docs(...), …).npm run lintandnpm run format:checkpass.npm run typecheckpasses.npm testpasses and coverage stays at or above the 80% gate.README.md/DOCUMENTATION.mdwhere relevant.Notes for reviewers
Sample-only change as discussed in #377. Live path behavior remains unchanged.
Summary by CodeRabbit
Bug Fixes
Tests