feat(gatekeeper): add PR merge automation service
Some checks failed
ci/woodpecker/push/ci Pipeline failed
Some checks failed
ci/woodpecker/push/ci Pipeline failed
This commit is contained in:
40
docs/scratchpads/ms-gate-001-gatekeeper.md
Normal file
40
docs/scratchpads/ms-gate-001-gatekeeper.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# MS-GATE-001 Scratchpad
|
||||
|
||||
## Objective
|
||||
|
||||
Build the API Gatekeeper module for PR auto-merge orchestration using Gitea PR webhooks, Woodpecker CI webhooks, and a `pending_merges` Prisma model.
|
||||
|
||||
## Constraints
|
||||
|
||||
- Work in `/home/jwoltje/src/mosaic-stack-worktrees/gate-001`
|
||||
- Do not merge or deploy
|
||||
- Must pass:
|
||||
- `pnpm format:check`
|
||||
- `SKIP_ENV_VALIDATION=true pnpm turbo typecheck`
|
||||
- `SKIP_ENV_VALIDATION=true pnpm turbo lint`
|
||||
- `SKIP_ENV_VALIDATION=true pnpm turbo test --filter=@mosaic/api -- --testPathPattern="gatekeeper"`
|
||||
|
||||
## ASSUMPTION
|
||||
|
||||
- Woodpecker PR pipelines expose `CI_COMMIT_PULL_REQUEST` and `CI_COMMIT_SHA`, so the webhook notifier can send `prNumber` and `headSha`.
|
||||
- Rationale: Gatekeeper needs an exact PR/head tuple to safely match CI back to `pending_merges`.
|
||||
|
||||
## Plan
|
||||
|
||||
1. Add Prisma model + SQL migration for `pending_merges`
|
||||
2. Add Gatekeeper NestJS module/controller/service/DTO/tests
|
||||
3. Wire Woodpecker webhook -> Gatekeeper CI handler
|
||||
4. Add env/config documentation and compose variables
|
||||
5. Run quality gates, review, remediate, push, open PR
|
||||
|
||||
## Progress
|
||||
|
||||
- [x] Context loaded
|
||||
- [ ] Tests added first
|
||||
- [ ] Implementation complete
|
||||
- [ ] Quality gates green
|
||||
- [ ] Push + PR opened
|
||||
|
||||
## Verification
|
||||
|
||||
- Pending
|
||||
Reference in New Issue
Block a user