From ad88fe59ede2c99b9cc96cb9999a7ba3dc2c7d97 Mon Sep 17 00:00:00 2001 From: aidenwang Date: Mon, 18 Jul 2022 16:57:47 -0700 Subject: [PATCH] temp --- dependencydiff/dependencydiff.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dependencydiff/dependencydiff.go b/dependencydiff/dependencydiff.go index f3bcfe39609..78850be20f8 100644 --- a/dependencydiff/dependencydiff.go +++ b/dependencydiff/dependencydiff.go @@ -124,7 +124,8 @@ func getScorecardCheckResults(dCtx *dependencydiffContext) error { // TODO (#2063): use the BigQuery dataset to supplement null source repo URLs to fetch the Scorecard results for them. if d.SourceRepository != nil && d.ChangeType != nil { // Run the checks on all types if (1) the type is found in changeTypesToCheck or (2) no types are specified. - if dCtx.changeTypesToCheck[*d.ChangeType] || (dCtx.changeTypesToCheck == nil || len(dCtx.changeTypesToCheck) == 0) { + noTypesGiven := dCtx.changeTypesToCheck == nil || len(dCtx.changeTypesToCheck) == 0 + if dCtx.changeTypesToCheck[*d.ChangeType] || noTypesGiven { // Initialize the repo and client(s) corresponding to the checks to run. err = initRepoAndClientByChecks(dCtx, *d.SourceRepository) if err != nil {