Teams
Organize your people into teams with granular repository access and notification routing.
Teams are the organizational primitive in Drok. They map your organizational structure — departments, squads, working groups — into the platform's access control and notification systems.
Creating Teams
drok team create my-org/backend \
--description "Backend engineering team" \
--visibility visibleOr through the web interface: navigate to your organization page and click New Team.
Team Visibility
| Visibility | Description |
|---|---|
| Visible | Team is visible to all organization members |
| Secret | Team is visible only to its members and organization owners |
Members
Adding Members
drok team add-member my-org/backend @alice
drok team add-member my-org/backend @bob --role maintainerMember Roles
| Role | Capabilities |
|---|---|
| Member | Access team repositories per team permissions |
| Maintainer | Manage team membership and settings |
Organization owners can manage all teams regardless of membership.
Nested Teams
Teams can be nested to reflect organizational hierarchy:
drok team create my-org/engineering
drok team create my-org/engineering/backend --parent my-org/engineering
drok team create my-org/engineering/frontend --parent my-org/engineeringChild teams inherit repository access from parent teams. Additional access can be granted to child teams without affecting the parent.
Repository Access
Grant a team access to repositories with a specific permission level:
drok team add-repo my-org/backend my-org/api-server --permission writePermission Levels
| Level | Capabilities |
|---|---|
| Read | Clone and pull. View issues and merge requests. |
| Triage | Read + manage issues and merge requests (label, assign, close) |
| Write | Triage + push to non-protected branches. Create merge requests. |
| Maintain | Write + manage repository settings. Push to protected branches with review. |
| Admin | Full repository administration including dangerous operations. |
Team Mentions
Mention a team in any comment or description to notify all members:
@my-org/backend Please review this API change.Team mentions respect notification preferences — members who have muted a repository will not receive the notification.
Team Discussions
Each team has a discussion board for internal communication:
drok team discuss my-org/backend --title "RFC: New auth architecture" --body "..."Discussions support Markdown formatting, file attachments, and threaded replies.
CODEOWNERS Integration
Teams are first-class in CODEOWNERS files:
# CODEOWNERS
/src/api/ @my-org/backend
/src/ui/ @my-org/frontend
/infra/ @my-org/devopsWhen a merge request modifies files matching a CODEOWNERS pattern, the specified team is automatically added as a reviewer. See CODEOWNERS for configuration details.
API
# List teams
curl https://drok.us/api/v1/orgs/my-org/teams \
-H "Authorization: Bearer $Drok_TOKEN"
# Get team members
curl https://drok.us/api/v1/orgs/my-org/teams/backend/members \
-H "Authorization: Bearer $Drok_TOKEN"
# Add repository access
curl -X PUT https://drok.us/api/v1/orgs/my-org/teams/backend/repos/api-server \
-H "Authorization: Bearer $Drok_TOKEN" \
-d '{"permission": "write"}'