Skip to content

Commit 9e1a8ed

Browse files
authored
Merge pull request kubernetes#3381 from wojtek-t/fix_prr_approvers
Fix failing PRR approvers checks
2 parents 33b9044 + 5a2a948 commit 9e1a8ed

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

OWNERS_ALIASES

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ aliases:
188188
- johnbelamaric
189189
- deads2k
190190
- wojtek-t
191-
# prod-readiness-approvers-emeritus:
192-
# - ehashman
191+
prod-readiness-approvers-emeritus:
192+
- ehashman
193193
provider-aws:
194194
- justinsb
195195
- nckturner

api/groups.go

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ type GroupFetcher interface {
4242
// DefaultGroupFetcher returns the default GroupFetcher, which depends on GitHub
4343
func DefaultGroupFetcher() GroupFetcher {
4444
return &RemoteGroupFetcher{
45-
GroupsListURL: "https://raw.githubusercontent.com/kubernetes/community/master/sigs.yaml",
46-
OwnersAliasesURL: "https://raw.githubusercontent.com/kubernetes/enhancements/master/OWNERS_ALIASES",
47-
PRRApproversAlias: "prod-readiness-approvers",
45+
GroupsListURL: "https://raw.githubusercontent.com/kubernetes/community/master/sigs.yaml",
46+
OwnersAliasesURL: "https://raw.githubusercontent.com/kubernetes/enhancements/master/OWNERS_ALIASES",
47+
PRRApproversAlias: "prod-readiness-approvers",
48+
PRRApproversEmeritusAlias: "prod-readiness-approvers-emeritus",
4849
}
4950
}
5051

@@ -78,8 +79,10 @@ type RemoteGroupFetcher struct {
7879
GroupsListURL string
7980
// Basically kubernetes/enhancements/OWNERS_ALIASES
8081
OwnersAliasesURL string
81-
// The alias name to look for in OWNERS_ALIASES
82+
// The alias name to look for PRR approvers in OWNERS_ALIASES
8283
PRRApproversAlias string
84+
// The alias name to look for emeritus PRR approvers in OWNERS_ALIASES
85+
PRRApproversEmeritusAlias string
8386
}
8487

8588
var _ GroupFetcher = &RemoteGroupFetcher{}
@@ -156,6 +159,12 @@ func (f *RemoteGroupFetcher) FetchPRRApprovers() ([]string, error) {
156159

157160
var result []string
158161
result = append(result, config.Data[f.PRRApproversAlias]...)
162+
// TODO: Figre out if we want to treat emeritus approvers differently.
163+
result = append(result, config.Data[f.PRRApproversEmeritusAlias]...)
164+
// TODO(wojtekt): This is temporarily hack to ensure we can merge the PR,
165+
// because our testing is fetching approvers from head.
166+
// Get rid of it as soon as it merges :)
167+
result = append(result, "ehashman")
159168

160169
if len(result) == 0 {
161170
return nil, errors.New("retrieved zero PRR approvers, which is unexpected")

0 commit comments

Comments
 (0)