forked from Gitlink/gitlink-cli
1.6 KiB
1.6 KiB
Issue Batch Maintenance Test Report
Scope
The tests cover the Issue batch maintenance shortcuts:
issue +batch-listissue +batch-closeissue +batch-label
They focus on filtering, dry-run safety, output structure, and API behavior.
Test Commands
gofmt -w shortcuts/issue/*.go shortcuts/common/*.go
go test ./shortcuts/issue
go test ./...
Unit Coverage
Implemented coverage includes:
- batch-list filtering by state, label, and inactive days
older-than-daysfilteringlimittruncation behavior- missing
updated_attolerance - batch-close safety validation
- batch-close default dry-run behavior
- batch-close dry-run does not call
PATCH - batch-label requires
--add-label - JSON output can be unmarshaled
- table output is non-empty and includes dry-run or execution summary
- per-item write failures are recorded in
errors - httptest issue list response normalization
Safety Verification
issue +batch-close refuses unsafe execution when:
--older-than-daysis missing--older-than-daysis lower than7--limitis greater than100
issue +batch-label refuses missing --add-label and does not fake remote
label writes when the add-label endpoint is not implemented.
Known Limitations
issue +batch-label --yesreports an endpoint-unavailable error until a stable label mutation endpoint is confirmed.- The batch commands currently fetch the first page using the configured limit. Larger multi-page workflows can be added later using the existing pagination helper if maintainers want that behavior.