mirror of
https://github.com/ossf/scorecard.git
synced 2024-11-04 03:52:31 +03:00
allow empty committer (#1714)
This commit is contained in:
parent
c1761a8936
commit
e128c3de82
@ -16,7 +16,6 @@ package githubrepo
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
"sync"
|
||||
@ -37,8 +36,6 @@ const (
|
||||
commitsToAnalyze = 30
|
||||
)
|
||||
|
||||
var errorInvalidCommitterLogin = errors.New("cannot retrieve committer login")
|
||||
|
||||
// nolint: govet
|
||||
type graphqlData struct {
|
||||
Repository struct {
|
||||
@ -198,6 +195,7 @@ func (handler *graphqlHandler) isArchived() (bool, error) {
|
||||
return handler.archived, nil
|
||||
}
|
||||
|
||||
//nolint
|
||||
func commitsFrom(data *graphqlData, repoOwner, repoName string) ([]clients.Commit, error) {
|
||||
ret := make([]clients.Commit, 0)
|
||||
for _, commit := range data.Repository.Object.Commit.History.Nodes {
|
||||
@ -214,10 +212,6 @@ func commitsFrom(data *graphqlData, repoOwner, repoName string) ([]clients.Commi
|
||||
committer = "github"
|
||||
}
|
||||
|
||||
if committer == "" {
|
||||
return ret, fmt.Errorf("commit %s: %w", commit.Oid, errorInvalidCommitterLogin)
|
||||
}
|
||||
|
||||
var associatedPR clients.PullRequest
|
||||
for i := range commit.AssociatedPullRequests.Nodes {
|
||||
pr := commit.AssociatedPullRequests.Nodes[i]
|
||||
|
Loading…
Reference in New Issue
Block a user