Skip to content

Commit 26baf8f

Browse files
committed
Debugging
1 parent fa9ad75 commit 26baf8f

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

main.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,13 @@ function check_severity_findings(dt_results_api_key, mobile_app_id, results_sinc
8585
}
8686
const findings_data = yield findings_response.json();
8787
const count = ((_a = findings_data.pagination_info) === null || _a === void 0 ? void 0 : _a.total_count) || 0;
88+
// print raw fidings data for debugging
89+
console.log(`Found ${count} ${severity} severity findings (results_since: ${effective_results_since})`);
90+
console.log(`Findings data: ${JSON.stringify(findings_data)}`);
8891
total_findings += count;
89-
if (count > 0) {
90-
return { has_findings: true, total_count: total_findings };
91-
}
92+
}
93+
if (total_findings > 0) {
94+
return { has_findings: true, total_count: total_findings };
9295
}
9396
return { has_findings: false, total_count: 0 };
9497
});

main.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,16 @@ async function check_severity_findings(
109109
const count = findings_data.pagination_info?.total_count || 0;
110110
// print raw fidings data for debugging
111111
console.log(
112-
`Found ${count} ${severity} severity findings (results_since: ${effective_results_since})`,
112+
`Found ${count} ${severity} severity findings (results_since: ${effective_results_since})`,
113113
);
114114
console.log(`Findings data: ${JSON.stringify(findings_data)}`);
115115

116116
total_findings += count;
117117
}
118118

119-
if (count > 0) {
120-
return { has_findings: true, total_count: total_findings };
121-
}
119+
if (total_findings > 0) {
120+
return { has_findings: true, total_count: total_findings };
121+
}
122122

123123
return { has_findings: false, total_count: 0 };
124124
}

0 commit comments

Comments
 (0)