feat(integrations): push GitLab pipeline, deployment, release, and merge request events by webhook
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 22/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- gitlab, nextjs, playwright, typescript
- Lĩnh vực
- api, backend, documentation
Hướng nghiên cứu
Start with docs/providers/gitlab.md ("Permissions", "Permission risks") and the accepted contract from #28, then read src/lib/adapters/gitlab/ to see how the OAuth scopes and existing polling event types are shaped. The work spans token verification, webhook creation/deletion, deduplication on the delivery id header, and mapping payloads onto the existing event types, plus unit tests on recorded sanitized payloads and a Playwright spec for both setup paths. Done means both setup paths land a pipeline event in the timeline within a minute, a repeated delivery shows once, and npm run lint, npm run typecheck, npm test pass. Two unknowns are unresolved in the issue (delivery-id header stability, api vs read_api coexistence) and it depends on #28 and #426, so confirm those before starting.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
Decision on #424 (2026-11-14): GitLab offers automatic setup as an opt-in and setup by hand. GitLab has no read-only scope that can create a webhook: automatic setup needs api, which is read and write on every project the user can reach, while the adapter holds read_api (docs/providers/gitlab.md, "Permissions"). The panel in #426 warns about this before asking, and points users who want DevMacro to stay read-only to setup by hand.
| Item | Value |
|---|---|
| Create | Project webhooks, one per project, through the API with api, or by hand in the project's Settings > Webhooks (Maintainer role). Group webhooks need a paid GitLab tier |
| Verification | A secret token DevMacro generates, sent back in X-Gitlab-Token and compared in constant time. It is a shared secret, not a body signature |
| Events for the timeline | Pipeline, deployment, release, and merge request events: the adapter's gitlab.pipeline.succeeded, gitlab.pipeline.failed, gitlab.deployment.succeeded, gitlab.deployment.failed, gitlab.release.published, gitlab.merge_request.merged |
| Not pushed | Compute minutes and storage. Polling stays |
Plan
- Declare GitLab's webhook in the #28 contract: automatic setup needs
api, DevMacro generates the secret token, steps for setup by hand per project. - Automatic: after the opt-in consent for
api, create a project webhook with DevMacro's URL, the secret token, and the four event kinds on every project the connection reads. Delete them on disconnect. Projects added later get a webhook on the next sync. - By hand: show the URL, the secret token, and the steps per project, and which projects have received a delivery.
- Verify
X-Gitlab-Token, deduplicate on GitLab's per-delivery id header, map deliveries to the connection by the per-connection URL. - Deliveries become the existing event types, so polling and webhooks show one entry.
- Docs:
docs/providers/gitlab.md("Permissions", "Permission risks" forapi, "Webhooks", self-hosted registration with theapiscope allowed on the OAuth app).
Acceptance criteria
- The opt-in write access warning from #426 shows before GitLab's consent screen.
- Automatic setup creates a webhook on each project, and a pipeline event reaches the timeline within a minute.
- Setup by hand works per project without requesting
api. - Disconnect deletes automatic webhooks.
- A wrong or missing token is rejected and logged without the body; a repeated delivery is ignored.
- An event seen by webhook and by polling shows once.
- Unit tests on recorded, sanitized payloads from GitLab's documented samples. No live calls in CI.
- Playwright e2e: both setup paths for the simulated GitLab provider.
Unverified
- The header GitLab uses for a unique delivery id (
X-Gitlab-Event-UUIDor an idempotency header), and whether it is stable across retries. - Whether an
apigrant and aread_apigrant for the same user and app can coexist, or the second replaces the first.
Files and areas
src/lib/adapters/gitlab/,docs/providers/gitlab.md,docs/operations/oauth-apps.md.- Non-goals: group webhooks, pushing compute minutes or storage.
Verification
npm run lint,npm run typecheck,npm test- Playwright spec for both setup paths.
Depends on
- #28 Ingest provider webhooks
- #426 Webhook setup panel
Branch: <issue-number>-gitlab-webhooks
Closes with a Closes #<issue-number> footer on the commit or pull request.
Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 1
- Merge trung bình
- 6 giờ 56 phút
- Pull request đã merge (30 ngày)
- 136
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của eddiejaoude/StackDash
-
area: docs documentation priority: P3 size: S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eddiejaoude/StackDash#462 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: web bug priority: P3 size: XS
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
eddiejaoude/StackDash#432 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: database bug priority: P3 size: S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eddiejaoude/StackDash#419 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: docs bug priority: P2 size: XS
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
eddiejaoude/StackDash#418 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility area: timeline bug priority: P3 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
eddiejaoude/StackDash#389 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của eddiejaoude/StackDash
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
open-webui/tether#52 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`void platform install --app-access public` fails when Cloudflare reports Access is disabledĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
voidzero-dev/void#835 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
AykutSarac/jsoncrack.com#616 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
melgarafael/DeskcommCRM#4679 ·
Maintainer thường phản hồi trong vòng 1 ngày