NestJS microservice for GitHub repository management and user invitations.
This service handles GitHub operations including:
- Creating team repositories
- Adding/removing users from repositories
- Managing repository permissions
- Deleting repositories
Use Node.js 26 (Docker and CI use 26.10.0) and pnpm 12.11.2:
Install pnpm:
corepack enable && corepack prepare pnpm@12.11.2 --activateor
npm install -g pnpm@12.11.2-
Install dependencies:
pnpm install --frozen-lockfile
-
Set up environment variables:
cp .env.example .env.local
Edit
.env.localwith your configuration (see Environment Variables below). -
Run development server:
pnpm start:dev
- Build:
pnpm build - Start:
pnpm start:prod
TypeScript stays on ~6.0.3: TypeScript 7.0.2 does not expose the JavaScript
compiler API required by Nest CLI and ts-jest, and is outside the supported
range of typescript-eslint. Revisit this pin when those tools support TypeScript 7.
Jest scripts enable VM modules to load the ESM packages introduced in NestJS 12.
From the repository root:
docker build --pull --platform linux/amd64 -t github-service:local ./github-service
docker run --rm --platform linux/amd64 --env-file github-service/.env github-service:localSet RABBITMQ_URL to a broker reachable from the container. Successful startup
logs Nest microservice successfully started and creates a consumer on the
github_service quorum queue. This is a RabbitMQ worker and has no HTTP port.
Local dependencies, build output, and environment files are excluded from the
Docker build context.
RABBITMQ_URL- RabbitMQ connection URL for message queueAPI_SECRET_ENCRYPTION_KEY- Key for decrypting encrypted secrets
This service runs as a NestJS microservice that listens to RabbitMQ events:
create_team_repository- Creates a new team repositoryadd_user_to_repository- Adds a user to a repositoryremove_user_from_repository- Removes a user from a repositoryremove_write_permissions- Changes user permissions to read-onlydelete_repository- Deletes a repository