Fixes #249
This PR fixes issues where create commands would fail in non-interactive mode when all optional fields were provided via flags.
Changes
Central Fix
- Modified
multi_fuzzy_select_with_key() to return empty vec when called with empty list instead of erroring
- Added unit tests for empty list behavior
Non-Interactive Mode Fixes
- Fixed
berg pull create to skip interactive prompts in non-interactive mode
- Fixed
berg milestone create to skip interactive prompts in non-interactive mode
Tests
- Added integration test for
pull create in non-interactive mode
- Added integration test for
milestone create in non-interactive mode
Fixed Commands
berg release create (already had non-interactive check)
berg pull create ✅
berg issue create (already had non-interactive check)
berg milestone create ✅
berg label create (already had non-interactive check)
Before
Commands would fail with:
There's nothing to select from
Caused by:
The input device is not a TTY
After
Commands work correctly in non-interactive mode when all required fields are provided via flags.
Fixes #249
This PR fixes issues where create commands would fail in non-interactive mode when all optional fields were provided via flags.
## Changes
### Central Fix
- Modified `multi_fuzzy_select_with_key()` to return empty vec when called with empty list instead of erroring
- Added unit tests for empty list behavior
### Non-Interactive Mode Fixes
- Fixed `berg pull create` to skip interactive prompts in non-interactive mode
- Fixed `berg milestone create` to skip interactive prompts in non-interactive mode
### Tests
- Added integration test for `pull create` in non-interactive mode
- Added integration test for `milestone create` in non-interactive mode
## Fixed Commands
- `berg release create` (already had non-interactive check)
- `berg pull create` ✅
- `berg issue create` (already had non-interactive check)
- `berg milestone create` ✅
- `berg label create` (already had non-interactive check)
## Before
Commands would fail with:
```
There's nothing to select from
Caused by:
The input device is not a TTY
```
## After
Commands work correctly in non-interactive mode when all required fields are provided via flags.