@api-emulator/gitlab
v0.2.2
Published
GitLab provides source hosting APIs for users, projects, issues, merge requests, discussions, notes, and iterations.
Readme
@api-emulator/gitlab
GitLab provides source hosting APIs for users, projects, issues, merge requests, discussions, notes, and iterations.
Use this emulator for local tests, CI, and offline agent runs. It keeps your tests separate from the production API.
Start the emulator
- Install the package.
npm install @api-emulator/gitlab- From this registry, start the emulator.
npx -p api-emulator api --plugin ./providers/@gitlab/api-emulator/src/index.js --service gitlabThe emulator uses the local URL that api-emulator prints. Set your client base URL to this local URL.
Supported API
POST /api/v4/*GET /api/v4/userGET /api/v4/usersGET /api/v4/projects/:projectGET /api/v4/projects/:project/issuesPOST /api/v4/projects/:project/issuesGET /api/v4/projects/:project/issues/:iidPUT /api/v4/projects/:project/issues/:iidPOST /api/v4/projects/:project/issues/:iid/notesGET /api/v4/projects/:project/merge_requests/:iidGET /api/v4/projects/:project/merge_requestsPOST /api/v4/projects/:project/merge_requestsPUT /api/v4/projects/:project/merge_requests/:iidGET /api/v4/projects/:project/merge_requests/:iid/changesGET /api/v4/projects/:project/merge_requests/:iid/diffsGET /api/v4/projects/:project/merge_requests/:iid/versionsPOST /api/v4/projects/:project/merge_requests/:iid/notesGET /api/v4/projects/:project/merge_requests/:iid/notesPOST /api/v4/projects/:project/merge_requests/:iid/discussionsGET /api/v4/projects/:project/merge_requests/:iid/discussionsGET /api/v4/groups/:group/iterations
Coverage
- Level:
smoke-only - Meaning: A smoke test starts the emulator and checks its main behavior.
- Evidence: a direct smoke test exists, but a conformance manifest does not exist.
Credentials
You do not need production credentials. Use fixed local credentials if your client requires them.
Test data
Add repeatable test data to the provider configuration.
gitlab:
# Add provider-specific seed state here.