dogedns: 0.2.6 -> 0.2.8 (#340101)
[NixPkgs.git] / ci / codeowners-validator / permissions.patch
blob38f42f483995b743e0db71d6e4a04f78264d4984
1 diff --git a/internal/check/valid_owner.go b/internal/check/valid_owner.go
2 index a264bcc..610eda8 100644
3 --- a/internal/check/valid_owner.go
4 +++ b/internal/check/valid_owner.go
5 @@ -16,7 +16,6 @@ import (
6 const scopeHeader = "X-OAuth-Scopes"
8 var reqScopes = map[github.Scope]struct{}{
9 - github.ScopeReadOrg: {},
12 type ValidOwnerConfig struct {
13 @@ -223,10 +222,7 @@ func (v *ValidOwner) validateTeam(ctx context.Context, name string) *validateErr
14 for _, t := range v.repoTeams {
15 // GitHub normalizes name before comparison
16 if strings.EqualFold(t.GetSlug(), team) {
17 - if t.Permissions["push"] {
18 - return nil
19 - }
20 - return newValidateError("Team %q cannot review PRs on %q as neither it nor any parent team has write permissions.", team, v.orgRepoName)
21 + return nil
25 @@ -245,10 +241,7 @@ func (v *ValidOwner) validateGitHubUser(ctx context.Context, name string) *valid
26 for _, u := range v.repoUsers {
27 // GitHub normalizes name before comparison
28 if strings.EqualFold(u.GetLogin(), userName) {
29 - if u.Permissions["push"] {
30 - return nil
31 - }
32 - return newValidateError("User %q cannot review PRs on %q as they don't have write permissions.", userName, v.orgRepoName)
33 + return nil