OrganizationTeams

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 visible

Or through the web interface: navigate to your organization page and click New Team.

Team Visibility

VisibilityDescription
VisibleTeam is visible to all organization members
SecretTeam 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 maintainer

Member Roles

RoleCapabilities
MemberAccess team repositories per team permissions
MaintainerManage 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/engineering

Child 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 write

Permission Levels

LevelCapabilities
ReadClone and pull. View issues and merge requests.
TriageRead + manage issues and merge requests (label, assign, close)
WriteTriage + push to non-protected branches. Create merge requests.
MaintainWrite + manage repository settings. Push to protected branches with review.
AdminFull 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/devops

When 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"}'