feat: CI execution scoring and self-hosted GitLab token fixes - #34
Conversation
Some self-hosted GitLab instances return 404 for the /user endpoint. Previously this fell through to raise_for_status() with an unhelpful traceback. Now raises GitLabAuthError with a clear message about checking the gitlab_url config. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Some self-hosted GitLab instances restrict the /api/v4/user endpoint. Token validation now tries /user first, then falls back to /version before giving up. This fixes the traceback seen when scanning self-hosted instances like gitlab.natera.com. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe GitLab token validation method now implements a fallback strategy: it first attempts authentication via the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Summary
.gitlab-ci.yml. Scoring reflects whether patterns are configured-only vs. actively running./api/v4/user. Falls back to/versionendpoint.Test plan
test_ci_execution.pywith 259 lines covering execution scoring logictest_validate_token.pycovering/user404 fallback to/versiontest_cli.pyfor validation flow changes🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
Bug Fixes
Tests