Skip to content

feat(server-nestjs): expose repository API v2 routes - #2408

Open
KepoParis wants to merge 1 commit into
feat/repository-v2-servicefrom
feat/repository-api-v2
Open

feat(server-nestjs): expose repository API v2 routes#2408
KepoParis wants to merge 1 commit into
feat/repository-v2-servicefrom
feat/repository-api-v2

Conversation

@KepoParis

@KepoParis KepoParis commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Issues liées

Issues numéro:


PR 5/5 de la pile « repository API v2 ». Base : feat/repository-v2-service.

Quel est le comportement actuel ?

La gestion des repositories est uniquement exposée par l'API v1 (legacy).

Quel est le nouveau comportement ?

Exposition de l'API v2 des repositories dans server-nestjs, montée sous
/api/v2/projects/:projectId/repositories :

Route Code Permissions Contraintes
GET / 200 ListProjects (admin) + ListRepositories (projet)
POST / 201 ManageRepositories statut projet, projet non verrouillé, utilisateur human
PUT /:repositoryId 200 ManageRepositories idem
DELETE /:repositoryId 204 ManageRepositories idem

Détails :

  • ProjectGuard sur le controller : le projectId du chemin est résolu en contexte
    projet, injecté par @Project(), l'utilisateur par @AuthUser().
  • Contraintes portées par les seules mutations : @RequireProjectStatus('initializing', 'created', 'failed', 'warning'), @RequireProjectLocked(false) et
    @RequireUserType('human') (équivalent du !perms.user legacy). Le GET n'en porte
    aucune.
  • Validation : corps parsés par ZodValidationPipe avec CreateRepositorySchema /
    UpdateRepositorySchema, et repositoryId validé par ParseUUIDPipe.
  • Enregistrement de RepositoryModule dans main.module.ts.
  • Couverture de tests du controller.

Cette PR introduit-elle un breaking change ?

Non. L'API v1 reste inchangée ; la v2 est ajoutée en parallèle.

Autres informations

Reste à faire dans une PR de suivi, hors de cette pile :

  • route de synchronisation (sync), qui reste servie par le serveur legacy
  • migration externalToken vers Vault
  • gestion tri-state de l'update

@github-actions github-actions Bot added the built label Aug 3, 2026
@KepoParis
KepoParis force-pushed the feat/repository-api-v2 branch from 705a742 to 8204c0e Compare August 4, 2026 13:24
@KepoParis KepoParis changed the title feat(server-nestjs): add repository API v2 feat(server-nestjs): expose repository API v2 routes Aug 4, 2026
@KepoParis
KepoParis changed the base branch from main to feat/repository-v2-service August 4, 2026 13:24
@KepoParis
KepoParis marked this pull request as ready for review August 4, 2026 13:30
@KepoParis
KepoParis force-pushed the feat/repository-api-v2 branch from 8204c0e to 2946302 Compare August 4, 2026 14:14
@KepoParis
KepoParis force-pushed the feat/repository-v2-service branch from ad92b92 to 904646f Compare August 4, 2026 14:14
@KepoParis KepoParis self-assigned this Aug 4, 2026
@StephaneTrebel
StephaneTrebel requested a review from a team August 5, 2026 08:49

@StephaneTrebel StephaneTrebel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@KepoParis
KepoParis force-pushed the feat/repository-api-v2 branch from 2946302 to 4288f08 Compare August 5, 2026 13:50
@KepoParis
KepoParis force-pushed the feat/repository-v2-service branch 2 times, most recently from 0c36bfd to 5352db8 Compare August 5, 2026 15:07
@KepoParis
KepoParis force-pushed the feat/repository-api-v2 branch from 4288f08 to 0ab0a44 Compare August 5, 2026 15:07
@KepoParis
KepoParis force-pushed the feat/repository-v2-service branch from 5352db8 to fc2762c Compare August 5, 2026 15:39
@KepoParis
KepoParis force-pushed the feat/repository-api-v2 branch from 0ab0a44 to ce2a119 Compare August 5, 2026 15:39
@cloud-pi-native-sonarqube

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants