fix(scripts): add empty description validation and branch checkout error handling#1559
Conversation
…ror handling Adds two critical improvements to both PowerShell and Bash feature creation scripts: 1. Post-trim validation: Prevents creating features with whitespace-only descriptions 2. Branch checkout error handling: Provides clear error messages when branch creation fails (e.g., branch already exists) instead of silently continuing Co-authored-by: Augment Agent <noreply@augmentcode.com>
There was a problem hiding this comment.
Pull request overview
This PR enhances the feature creation scripts by adding robust input validation and error handling for common failure scenarios. The changes prevent edge cases where users provide invalid input or attempt to create duplicate branches, providing clear and actionable error messages instead of silent failures.
Changes:
- Added post-trim validation to prevent features with whitespace-only descriptions from being created
- Implemented explicit error handling for git branch creation failures with specific messages for duplicate branches versus other errors
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/powershell/create-new-feature.ps1 | Added whitespace-only description validation and branch creation error handling with detailed error messages |
| scripts/bash/create-new-feature.sh | Added whitespace-only description validation and branch creation error handling with detailed error messages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@zaheer15351 Can you address the feedback Copilot added? |
|
Addressed Copilot feedback by making stderr redirection consistent in scripts/powershell/create-new-feature.ps1 (using 2> for git checkout -b). The update is pushed to this branch. Please re-review when convenient. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ade-v0.1.7 * upstream/main: (26 commits) Add Community Walkthroughs section to README (github#1766) feat(extensions): add Jira Integration to community catalog (github#1764) Add Azure DevOps Integration extension to community catalog (github#1734) Fix docs: update Antigravity link and add initialization example (github#1748) fix: wire after_tasks and after_implement hook events into command templates (github#1702) make c ignores consistent with c++ (github#1747) chore: bump version to 0.1.13 (github#1746) feat: add kiro-cli and AGENT_CONFIG consistency coverage (github#1690) feat: add verify extension to community catalog (github#1726) Add Retrospective Extension to community catalog README table (github#1741) fix(scripts): add empty description validation and branch checkout error handling (github#1559) fix: correct Copilot extension command registration (github#1724) fix(implement): remove Makefile from C ignore patterns (github#1558) Add sync extension to community catalog (github#1728) fix(checklist): clarify file handling behavior for append vs create (github#1556) fix(clarify): correct conflicting question limit from 10 to 5 (github#1557) chore: bump version to 0.1.12 (github#1737) fix: use RELEASE_PAT so tag push triggers release workflow (github#1736) fix: release-trigger uses release branch + PR instead of direct push to main (github#1733) fix: Split release process to sync pyproject.toml version with git tags (github#1732) ...
…ror handling (github#1559) * fix(scripts): add empty description validation and branch checkout error handling Adds two critical improvements to both PowerShell and Bash feature creation scripts: 1. Post-trim validation: Prevents creating features with whitespace-only descriptions 2. Branch checkout error handling: Provides clear error messages when branch creation fails (e.g., branch already exists) instead of silently continuing Co-authored-by: Augment Agent <noreply@augmentcode.com> * fix(scripts): use consistent stderr redirection for branch checkout --------- Co-authored-by: Augment Agent <noreply@augmentcode.com>
Adds two critical improvements to both PowerShell and Bash feature creation scripts: