Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate team maintainers to members #566

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ func testTeamMembers(teams map[string]org.Team, admins sets.String, orgMembers s
teamMaintainers = normalize(teamMaintainers)
teamMembers = normalize(teamMembers)

// check for non-admins in maintainers list
if nonAdminMaintainers := teamMaintainers.Difference(admins); len(nonAdminMaintainers) > 0 {
errs = append(errs, fmt.Errorf("The team %s in org %s has non-admins listed as maintainers; these users should be in the members list instead: %s", teamName, orgName, strings.Join(nonAdminMaintainers.List(), ",")))
}

// check for users in both maintainers and members
if both := teamMaintainers.Intersection(teamMembers); len(both) > 0 {
errs = append(errs, fmt.Errorf("The team %s in org %s has users in both maintainer admin and member roles: %s", teamName, orgName, strings.Join(both.List(), ", ")))
Expand All @@ -122,9 +127,6 @@ func testTeamMembers(teams map[string]org.Team, admins sets.String, orgMembers s
}

// check if all are org members
if missing := teamMaintainers.Difference(orgMembers); len(missing) > 0 {
errs = append(errs, fmt.Errorf("The following maintainers of team %s are not %s org members: %s", teamName, orgName, strings.Join(missing.List(), ", ")))
}
if missing := teamMembers.Difference(orgMembers); len(missing) > 0 {
errs = append(errs, fmt.Errorf("The following members of team %s are not %s org members: %s", teamName, orgName, strings.Join(missing.List(), ", ")))
}
Expand Down
24 changes: 8 additions & 16 deletions config/kubernetes-client/org.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,57 +58,49 @@ teams:
privacy: secret
csharp-admins:
description: admin access to csharp
maintainers:
- krabhishek8260
members:
- brendandburns
- krabhishek8260
privacy: closed
gen-admins:
description: admin access to gen
maintainers:
- mbohlool
members:
- brendandburns
- mbohlool
privacy: closed
haskell-admins:
description: admin access to haskell
maintainers:
- mbohlool
members:
- brendandburns
- mbohlool
privacy: closed
java-admins:
description: admin access to java
maintainers:
- mbohlool
members:
- brendandburns
- mbohlool
privacy: closed
javascript-admins:
description: admin access to javascript
maintainers:
- mbohlool
members:
- brendandburns
- mbohlool
privacy: closed
python-admins:
description: admin access to python
maintainers:
- mbohlool
members:
- mbohlool
- yliaog
privacy: closed
python-base-admins:
description: ""
maintainers:
- mbohlool
members:
- mbohlool
- yliaog
privacy: closed
ruby-admins:
description: admin access to ruby
maintainers:
- mbohlool
members:
- brendandburns
- mbohlool
privacy: closed
Loading