feat(gitlab): add webhook handling, tagging, and shared VCS module#7122
feat(gitlab): add webhook handling, tagging, and shared VCS module#7122asaphko wants to merge 2 commits intofeature/gitlab-configfrom
Conversation
Add webhook endpoint, event-driven tagging, async comment posting, and extract shared VCS comment generation from the GitHub integration. Key architectural improvements over #7028: - Credentials never passed through task queue (security) - Business logic in services.py, data mapping in mappers.py - Thin task entry point fetches config from DB - Shared VCS module for comment generation (GitHub refactored too) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
for more information, see https://pre-commit.ci
Docker builds report
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feature/gitlab-config #7122 +/- ##
=========================================================
- Coverage 98.26% 98.10% -0.16%
=========================================================
Files 1353 1360 +7
Lines 50436 50685 +249
=========================================================
+ Hits 49560 49724 +164
- Misses 876 961 +85 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add webhook endpoint, event-driven feature tagging, and async comment posting for the GitLab integration. Also extract shared VCS comment generation used by both GitHub and GitLab. Third PR in the stacked series splitting #7028.
Changes
/api/v1/gitlab-webhook/<project_pk>/with token validationintegrations/vcs/module: comment generation, constants, feature state helpersgenerate_body_commentto delegate to shared VCS moduleservices.py, data mapping inmappers.py, thintasks.pyContributes to #7028
Stacks on #7121
Review effort: 3/5
Review feedback addressed from #7028
services.pyfor business logic,mappers.pyfor data mapping,tasks.pyas thin entry point (khvn26, per api/README.md)integrations/vcs/for comment generation (khvn26: "this logic should be abstracted out")generate_body_comment(emyller: "why not interfacing with this function directly")tag_by_event_typeusesGitLabTagenum not raw strings (khvn26)helpers.py(emyller: "doesn't look much of a helper")handle_gitlab_webhook_eventbranches (emyller)Not yet included (follow-up)
features/models.py,features/serializers.py) callingdispatch_gitlab_comment— these mirror the existing GitHub pattern and will be added once this PR's architecture is approvedfeature_external_resources/views.pyGitLab metadata enrichmentfeature_external_resources/models.pylifecycle hooks for GitLab🤖 Generated with Claude Code