feat(orgs): auto-create default teams on org creation (#513) #708
Reference in New Issue
Block a user
Delete Branch "feature/default-teams"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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: AddedDefaultTeamSpectype,DefaultOrgTeamsvariable with 3 team definitions, and loop inCreateOrganizationto 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-DefaultOrgTeamsis 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-NumTeamscorrectly set to1 + 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