Skip to content

Commit

Permalink
Revert "Merge pull request kubernetes#591 from nikhita/revert-migrate…
Browse files Browse the repository at this point in the history
…-maintainers-for-k-incubator"

This reverts commit 25767f0, reversing
changes made to 43666b8.
  • Loading branch information
nikhita committed Mar 11, 2019
1 parent 77f1d6f commit d5d9b1d
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 68 deletions.
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
Loading

0 comments on commit d5d9b1d

Please sign in to comment.