refactor: restructure into src/gitea_ci package

Split monolithic gitea-ci.py (3068 lines) into modular package:
- src/gitea_ci/config.py: configuration, constants
- src/gitea_ci/api.py: GiteaAPI class
- src/gitea_ci/formatters.py: output formatting
- src/gitea_ci/utils.py: utilities, validation
- src/gitea_ci/commands/: command implementations
- src/gitea_ci/cli.py: argument parser, dispatch

gitea-ci.py now thin wrapper (16 lines)
This commit is contained in:
Username
2026-01-18 18:59:22 +01:00
parent c8b85e8977
commit 8d05e90160
17 changed files with 3345 additions and 3062 deletions

View File

@@ -151,3 +151,25 @@ NO_COLOR Disable colors when set
"default_repo": "myproject"
}
```
## Package Structure
```
gitea-ci.py Wrapper script (entry point)
style.py Styling utilities
src/gitea_ci/
├── cli.py Argument parser, dispatch
├── config.py Configuration
├── api.py Gitea API client
├── formatters.py Output formatting
├── utils.py Utilities
└── commands/ Command implementations
```
## Validation
```sh
python3 -m py_compile src/gitea_ci/*.py # Syntax check
./gitea-ci.py --help # Test CLI
python3 -m gitea_ci --help # Module mode (PYTHONPATH=src)
```