@@ -17,7 +17,6 @@ package githubrepo
1717import (
1818 "context"
1919 "fmt"
20- "strings"
2120 "sync"
2221 "time"
2322
@@ -34,7 +33,6 @@ const (
3433 reviewsToAnalyze = 30
3534 labelsToAnalyze = 30
3635 commitsToAnalyze = 30
37- allowedCommitterName = "github"
3836)
3937
4038// nolint: govet
@@ -232,20 +230,15 @@ func pullRequestsFrom(data *graphqlData, repoOwner, repoName string) []clients.P
232230 return ret
233231}
234232
233+ // nolint: unparam
235234func commitsFrom (data * graphqlData ) ([]clients.Commit , error ) {
236235 ret := make ([]clients.Commit , 0 )
237236 for _ , commit := range data .Repository .DefaultBranchRef .Target .Commit .History .Nodes {
238237 var committer string
239238 if commit .Committer .User .Login != nil {
240239 committer = * commit .Committer .User .Login
241- } else if commit .Committer .Name != nil {
242- committer = * commit .Committer .Name
243- // committer.name will be set to `github` if this was auto-merged by GitHub.
244- if ! strings .EqualFold (committer , allowedCommitterName ) {
245- return nil , sce .WithMessage (sce .ErrScorecardInternal ,
246- fmt .Sprintf ("committer name is not '%s': %s" , allowedCommitterName , committer ))
247- }
248240 }
241+ // TODO(#1543): Figure out a way to safely get committer if `User.Login` is `nil`.
249242 ret = append (ret , clients.Commit {
250243 CommittedDate : commit .CommittedDate .Time ,
251244 Message : string (commit .Message ),
0 commit comments