feat: Validate default branch exists in repo when setting project defaultBranch

registerProject and updateProject now verify via remoteBranchExists that the
specified branch actually exists in the cloned repository before saving.
This commit is contained in:
Lukas May
2026-02-10 11:46:00 +01:00
parent a8d3f52d09
commit 771cd71c1e
6 changed files with 174 additions and 2 deletions

View File

@@ -140,10 +140,10 @@ Each procedure uses `require*Repository(ctx)` helpers that throw `TRPCError(INTE
### Projects
| Procedure | Type | Description |
|-----------|------|-------------|
| registerProject | mutation | Clone git repo, create record |
| registerProject | mutation | Clone git repo, create record. Validates defaultBranch exists in repo |
| listProjects | query | All projects |
| getProject | query | Single project |
| updateProject | mutation | Update project settings (defaultBranch) |
| updateProject | mutation | Update project settings (defaultBranch). Validates branch exists in repo |
| deleteProject | mutation | Delete clone and record |
| getInitiativeProjects | query | Projects for initiative |
| updateInitiativeProjects | mutation | Sync junction table |