mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-20 05:27:12 +03:00
🌱 GitLab: Add log message (#3319)
* log msg Signed-off-by: Raghav Kaul <raghavkaul@google.com> * address pr comments * log once * todo Signed-off-by: Raghav Kaul <raghavkaul@google.com> --------- Signed-off-by: Raghav Kaul <raghavkaul@google.com>
This commit is contained in:
parent
b992be36e0
commit
e9495bbaa3
@ -189,6 +189,8 @@ func (client *Client) ListCommits() ([]clients.Commit, error) {
|
||||
// GitLab REST API doesn't provide a way to link Merge Requests and Commits that
|
||||
// are within them without making a REST call for each commit (~30 by default)
|
||||
// Making 1 GraphQL query to combine the results of 2 REST calls, we avoid this
|
||||
// TODO(#3193): Fix the way graphql retrieves merge details to more closely
|
||||
// line up with commits from listRawCommits
|
||||
mrDetails, err := client.graphql.getMergeRequestsDetail(before)
|
||||
if err != nil {
|
||||
return []clients.Commit{}, err
|
||||
|
@ -16,6 +16,7 @@ package gitlabrepo
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
@ -52,6 +53,12 @@ func (handler *commitsHandler) setup() error {
|
||||
return
|
||||
}
|
||||
handler.commitsRaw = commits
|
||||
if handler.repourl.commitSHA != clients.HeadSHA {
|
||||
//nolint:lll
|
||||
// TODO(#3193): Fix the way graphql retrieves merge details to more closely
|
||||
// line up with commits from listRawCommits
|
||||
fmt.Fprintln(os.Stderr, "Scorecard may be missing merge requests when running on non-HEAD of a GitLab repo. Code-Review scores may be lower.")
|
||||
}
|
||||
})
|
||||
|
||||
return handler.errSetup
|
||||
|
Loading…
Reference in New Issue
Block a user