Skip to content

Commit

Permalink
Remove checking team permission as it is not working properly (#24)
Browse files Browse the repository at this point in the history
I described current problem with  the team permission check here:
#21 (comment)

For now, I'm going to delete that functionality because fixing it will increase number of calls to GitHub and also requires that use will pass the repo name when executing validator
  • Loading branch information
mszostok authored Mar 15, 2020
1 parent 12fc383 commit 25929b2
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions internal/check/valid_owner.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,23 +152,10 @@ func (v *ValidOwnerChecker) validateTeam(ctx context.Context, name string) *vali
return false
}

teamHasPermissions := func() bool {
for _, v := range allTeams {
if v.GetPermission() != "pull" {
return true
}
}
return false
}

if !teamExists() {
return &validateError{fmt.Sprintf("Team %q does not exist in organization %q or has no permissions associated with the repository.", team, org), Warning, false}
}

if !teamHasPermissions() {
return &validateError{fmt.Sprintf("Team %q doesn't have write access to the repository.", team), Warning, false}
}

return nil
}

Expand Down

0 comments on commit 25929b2

Please sign in to comment.