Skip to content

Commit 2d0e538

Browse files
Revert Committer.Name change (#1576)
Co-authored-by: Azeem Shaikh <azeems@google.com>
1 parent e4eb6d2 commit 2d0e538

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

clients/githubrepo/graphql.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package githubrepo
1717
import (
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
235234
func 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

Comments
 (0)