Fix project filter resolution for full GitLab URLs and remove new resolver file by integrating logic into existing modules
This MR fixes project-scoped analytics when users enter a full GitLab project URL (including nested group paths and optional .git suffix).
Previously, project resolution could fail with 404 because path-based project identifiers were not consistently normalized/encoded before API calls.
The expected behavior is now met: when a full GitLab URL is entered, the app extracts the project path, encodes it correctly, resolves the project ID, and fetches contribution data without 404 errors.
What changed
- Added project input normalization + resolution logic to existing projects.py:
- Supports numeric ID, namespace path, and full URL inputs
- Strips .git suffix
- Encodes nested paths for /projects/:id lookup
- Maps API failures to clearer resolution errors (not_found, permission_denied, etc.)
- Updated existing mode files to use resolver logic from projects.py:
- Consolidated tests into existing test_batch_logic.py for:
- URL/path/ID normalization
- Encoded path resolution flow
- Not-found error mapping
- Project-filtered pipeline call behavior
Behavioral impact
- Project filter now reliably works for:
- 12345
- group/subgroup/project
- https://gitlab.example.com/group/subgroup/project.git
- No UI flow changes; only resolution reliability and error clarity improved.
Validation
- Syntax/compile check passed for modified files (python3 -m py_compile ...).
- Full pytest run was not executed in this environment because pytest is unavailable.