-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
PledgeableThis issue can receive pledges/donations on OpenPledgeThis issue can receive pledges/donations on OpenPledge
Description
Problem
The entire CLI tool is currently contained in a single gitHappens.py file, making it difficult to maintain, test, and extend. This monolithic structure violates separation of concerns and makes the codebase harder to navigate.
Solution
Split the monolithic file into a modular architecture with clear separation of responsibilities.
Proposed Structure
├── main.py # Entry point and argument parsing
├── gitlab_api.py # GitLab API interactions
├── config.py # Configuration management
├── templates.py # Template processing
├── git_utils.py # Git operations
├── interactive.py # User prompts and CLI interactions
└── commands/
├── create_issue.py # Issue creation logic
├── review.py # Review workflow
├── deploy.py # Deployment checks
└── open_mr.py # Merge request operations
Acceptance Criteria
- Extract GitLab API calls into
gitlab_api.py - Move configuration handling to
config.py - Separate template logic into
templates.py - Create command-specific modules in
commands/folder - Ensure all existing functionality works unchanged
- Add basic unit tests for each module
- Update README with new structure
Benefits
- Improved code maintainability
- Easier testing and debugging
- Better separation of concerns
- Simpler onboarding for contributors
Priority: Medium
Labels: refactoring, technical-debt, enhancement
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
PledgeableThis issue can receive pledges/donations on OpenPledgeThis issue can receive pledges/donations on OpenPledge