feat(integrations): push GitLab pipeline, deployment, release, and merge request events by webhook
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 22/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- gitlab, nextjs, playwright, typescript
- Ambito
- api, backend, documentation
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 1
- Fork
- 1
- Merge medio
- 6h 56m
- PR unite (30g)
- 136
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di eddiejaoude/StackDash
-
area: docs documentation priority: P3 size: S
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
eddiejaoude/StackDash#462 ·
I maintainer di solito rispondono entro 1 giorno
-
area: web bug priority: P3 size: XS
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
eddiejaoude/StackDash#432 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area: database bug priority: P3 size: S
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
eddiejaoude/StackDash#419 ·
I maintainer di solito rispondono entro 1 giorno
-
area: docs bug priority: P2 size: XS
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
eddiejaoude/StackDash#418 ·
I maintainer di solito rispondono entro 1 giorno
-
accessibility area: timeline bug priority: P3 size: XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
eddiejaoude/StackDash#389 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di eddiejaoude/StackDash
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
open-webui/tether#52 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
voidzero-dev/void#835 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
AykutSarac/jsoncrack.com#616 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
melgarafael/DeskcommCRM#4679 ·
I maintainer di solito rispondono entro 1 giorno