Skip to content

Commit

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

Revert migrate maintainers to members for kubernetes-incubator
  • Loading branch information
k8s-ci-robot authored Mar 11, 2019
2 parents 43666b8 + 5f25cb1 commit 25767f0
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 50 deletions.
8 changes: 3 additions & 5 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@ 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 @@ -127,6 +122,9 @@ 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 25767f0

Please sign in to comment.