Skip to content

Commit

Permalink
Fixed Label issue for Info (#1363)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsKedar authored Jul 26, 2024
1 parent 1767caa commit 1d9fefa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@
import org.springframework.web.client.HttpStatusCodeException;
import org.springframework.web.client.RestTemplate;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;

@Service("GitHub")
public class GitHubIssueTracker implements IssueTracker {
Expand Down Expand Up @@ -337,7 +334,7 @@ private String[] getString(ScanResults.XIssue resultIssue) {
try {
Map<FindingSeverity, String> findingsPerSeverity = properties.getIssueslabel();
for (Map.Entry<FindingSeverity, String> entry : findingsPerSeverity.entrySet()) {
if(resultIssue.getSeverity().equalsIgnoreCase(entry.getKey().toString())){
if(resultIssue.getSeverity().equalsIgnoreCase(entry.getKey().toString()) || resultIssue.getSeverity().toLowerCase(Locale.ROOT).contains(entry.getKey().toString().toLowerCase(Locale.ROOT))){
//converting using String.split() method with whitespace as a delimiter
strArray = entry.getValue().split(",");
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ private String getString(ScanResults.XIssue resultIssue) {
try {
Map<FindingSeverity, String> findingsPerSeverity = properties.getIssueslabel();
for (Map.Entry<FindingSeverity, String> entry : findingsPerSeverity.entrySet()) {
if (resultIssue.getSeverity().equalsIgnoreCase(entry.getKey().toString())) {
if (resultIssue.getSeverity().equalsIgnoreCase(entry.getKey().toString()) || resultIssue.getSeverity().toLowerCase(Locale.ROOT).contains(entry.getKey().toString().toLowerCase(Locale.ROOT))) {
label = entry.getValue();
break;
}
Expand Down

0 comments on commit 1d9fefa

Please sign in to comment.