Skip to content

Commit e600630

Browse files
author
ksidoren
committed
fix: semver versions #154
1 parent f97415a commit e600630

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,12 @@ const generateReport = async options => {
182182
DEFAULT_ISSUES_FILTER = "&types=VULNERABILITY";
183183
DEFAULT_RULES_FILTER = "&types=VULNERABILITY";
184184
ISSUE_STATUSES = "OPEN,CONFIRMED,REOPENED";
185-
} else if (semver.satisfies(version, ">=7.3 && <7.8")) {
185+
} else if (semver.satisfies(version, "7.3 - 7.8")) {
186186
// hotspots are stored in the /issues endpoint but issue status doesn't include TO_REVIEW,IN_REVIEW yet
187187
DEFAULT_ISSUES_FILTER = "&types=VULNERABILITY,SECURITY_HOTSPOT";
188188
DEFAULT_RULES_FILTER = "&types=VULNERABILITY,SECURITY_HOTSPOT";
189189
ISSUE_STATUSES = "OPEN,CONFIRMED,REOPENED";
190-
} else if (semver.satisfies(version, ">=7.8 && <8.2")) {
190+
} else if (semver.satisfies(version, "7.8 - 8.2")) {
191191
// hotspots are stored in the /issues endpoint and issue status includes TO_REVIEW,IN_REVIEW
192192
DEFAULT_ISSUES_FILTER = "&types=VULNERABILITY,SECURITY_HOTSPOT";
193193
DEFAULT_RULES_FILTER = "&types=VULNERABILITY,SECURITY_HOTSPOT";
@@ -386,7 +386,8 @@ const generateReport = async options => {
386386
} while (nbResults === pageSize && page <= maxPage);
387387

388388
let hSeverity = "";
389-
if (version >= "8.2" && !data.noSecurityHotspot) {
389+
390+
if (!data.noSecurityHotspot && semver.satisfies(version, ">=8.2")) {
390391
// 1) Listing hotspots with hotspots/search
391392
page = 1;
392393
do {

0 commit comments

Comments
 (0)