Skip to content

Conversation

@Pertempto
Copy link
Collaborator

No description provided.

Pertempto and others added 30 commits December 20, 2025 06:58
- Remove commit/push from new command (user handles this)
- Remove CommitChanges and PushBranch functions
- Remove related tests
- Remove unused git import from cmd/new.go
- Prevents branch name conflicts by including YYYY-MM-DD suffix
- Updates context to generate branch names as spec/NNN-title-YYYY-MM-DD
- Updates test to verify date suffix is present
- More accurately reflects the function's behavior (converts to slug and sanitizes)
- Update all references in context.go and spec_test.go
- Update comments to clarify purpose
- Rename internal/new Context to NewCommandContext
- Rename internal/setup Context to SetupCommandContext
- Each command now has a clearly named context type
- Matches naming pattern in internal/new/context.go
- Both packages now have context.go as their main file
- Matches the naming of the test file in internal/new
- Both test files now follow the context_test.go naming pattern
- Add OriginalBranch field to NewCommandContext
- Add GetCurrentBranch() helper to git package
- Cleanup now checks out to original branch before deleting spec branch
- Update integration tests to create initial commit
- Verifies spec file is removed
- Verifies branch is deleted
- Verifies original branch is restored
- Add test for missing file scenario
- Add test for restoring different branch (not main/master)
- All edge cases pass
- Add test coverage requirements
- Document table-driven test pattern
- Include edge case testing guidance
- Add helper function and mocking best practices
- Include test naming conventions
- Add defensive cleanup call if CreateSpec fails
- Ensures no dangling files or branches even if CreateSpec error handling is bypassed
@Pertempto Pertempto merged commit 0d6aa93 into main Dec 22, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants