feat(orgs): auto-create default teams on org creation (#513) #708

Merged
jmiller merged 1 commits from feature/default-teams into dev 2026-06-28 08:45:37 +00:00
Owner

Summary\n- New organizations now get three default teams in addition to Owners (#513)\n- Developers: write access to code, issues, PRs, wiki, projects; read releases\n- Reviewers: read access to code, issues, PRs, releases, wiki\n- CI/CD: write access to actions, packages, releases; read code\n\n## Changes\n- models/organization/org.go: Added DefaultTeamSpec type, DefaultOrgTeams variable with 3 team definitions, and loop in CreateOrganization to create them inside the same transaction\n- CHANGELOG.md: Added entry under [Unreleased]\n\n## Design\n- Teams are created atomically inside the existing org creation transaction\n- DefaultOrgTeams is an exported package variable — can be overridden in tests or via init\n- No migration needed — only affects new org creation, no schema changes\n- NumTeams correctly set to 1 + len(DefaultOrgTeams) (Owners + defaults)\n\n## Test plan\n- [ ] Create a new organization — verify 4 teams exist (Owners, Developers, Reviewers, CI/CD)\n- [ ] Verify each team has correct permissions and unit access\n- [ ] Verify existing orgs are unaffected\n- [ ] Verify IncludesAllRepositories is true on all default teams\n\nhttps://claude.ai/code/session_011AAFzotGMf3ayvXhEmStCd

## Summary\n- New organizations now get three default teams in addition to Owners (#513)\n- **Developers**: write access to code, issues, PRs, wiki, projects; read releases\n- **Reviewers**: read access to code, issues, PRs, releases, wiki\n- **CI/CD**: write access to actions, packages, releases; read code\n\n## Changes\n- `models/organization/org.go`: Added `DefaultTeamSpec` type, `DefaultOrgTeams` variable with 3 team definitions, and loop in `CreateOrganization` to create them inside the same transaction\n- `CHANGELOG.md`: Added entry under [Unreleased]\n\n## Design\n- Teams are created atomically inside the existing org creation transaction\n- `DefaultOrgTeams` is an exported package variable — can be overridden in tests or via init\n- No migration needed — only affects new org creation, no schema changes\n- `NumTeams` correctly set to `1 + len(DefaultOrgTeams)` (Owners + defaults)\n\n## Test plan\n- [ ] Create a new organization — verify 4 teams exist (Owners, Developers, Reviewers, CI/CD)\n- [ ] Verify each team has correct permissions and unit access\n- [ ] Verify existing orgs are unaffected\n- [ ] Verify IncludesAllRepositories is true on all default teams\n\nhttps://claude.ai/code/session_011AAFzotGMf3ayvXhEmStCd
jmiller added 1 commit 2026-06-28 07:09:07 +00:00
feat(orgs): auto-create default teams on org creation (#513)
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
PR RC Release / Build RC Release (pull_request) Successful in 4s
Universal: PR Check / Validate PR (pull_request) Failing after 14s
Universal: Auto Version Bump / Version Bump (push) Successful in 20s
Generic: Project CI / Lint & Validate (pull_request) Successful in 39s
Universal: PR Check / Secret Scan (pull_request) Successful in 1m57s
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
e99658ddc0
New organizations now get three default teams in addition to Owners:
- Developers (write: code, issues, PRs, wiki, projects; read: releases)
- Reviewers (read: code, issues, PRs, releases, wiki)
- CI/CD (write: actions, packages, releases; read: code)

Teams are defined in DefaultOrgTeams and created inside the same
transaction as the org, so creation is atomic.

Claude-Session: https://claude.ai/code/session_011AAFzotGMf3ayvXhEmStCd
jmiller merged commit b9c04e51b4 into dev 2026-06-28 08:45:37 +00:00
jmiller deleted branch feature/default-teams 2026-06-28 08:45:38 +00:00
Sign in to join this conversation.