1.4 KiB
1.4 KiB
Member application shortcuts
This change extends gitlink-cli member from direct collaborator and invite-link operations to the project membership application workflow.
New shortcuts:
member +applicationslists project membership applications for a user inbox with--user,--page, and--per-page.member +accept-applicationaccepts an application byapplied_projects[].idand supports--dry-run.member +refuse-applicationrefuses an application byapplied_projects[].idand supports--dry-run.member +applyapplies to join a project with an application code and requested role, also supporting--dry-run.
The implementation follows the documented GitLink OpenAPI endpoints:
GET /api/users/{owner}/applied_projects.jsonPOST /api/users/{owner}/applied_projects/{id}/accept.jsonPOST /api/users/{owner}/applied_projects/{id}/refuse.jsonPOST /api/applied_projects.json
Safety details:
- Application decisions validate positive integer IDs before calling the API.
- Application role values are normalized to
manager,developer, orreporter. - Dry-run output includes the method, path, and request body where applicable.
- When
--useris omitted, the shortcut uses--ownerfirst and falls back toGET /users/me.
Verification:
go test ./shortcuts/membergo test ./shortcutsgo test ./...go build ./...go run ./internal/i18n/cmd/check --scan-codegit diff --check