mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-17 11:57:12 +03:00
🌱 cron: don't write anything for projects without URL (#4095)
We still run into the 429 GCS responses due to the lower limits on the same file. All of the projects without a repo_url are being mapped to the same object and leading to rate limiting. "Maximum rate of writes to the same object name: One write per second" https://cloud.google.com/storage/quotas#objects Signed-off-by: Spencer Schrock <sschrock@google.com>
This commit is contained in:
parent
cc7132d631
commit
c92efe9bb2
@ -42,6 +42,9 @@ func writeToCIIDataBucket(ctx context.Context, pageResp []ciiPageResp, bucketURL
|
||||
for _, project := range pageResp {
|
||||
projectURL := strings.TrimPrefix(project.RepoURL, "https://")
|
||||
projectURL = strings.TrimPrefix(projectURL, "http://")
|
||||
if projectURL == "" {
|
||||
continue
|
||||
}
|
||||
jsonData, err := clients.BadgeResponse{
|
||||
BadgeLevel: project.BadgeLevel,
|
||||
}.AsJSON()
|
||||
|
Loading…
Reference in New Issue
Block a user