Skip to content

Commit

Permalink
Don't access ScanStatus on nil
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Jan 19, 2025
1 parent b69fd35 commit 778ee05
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scanpullrequest/scanpullrequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@ func auditPullRequest(repoConfig *utils.Repository, client vcsclient.VcsClient)
scanDetails.SetProject(&repoConfig.Projects[i])
var projectIssues *issues.ScansIssuesCollection
if projectIssues, err = auditPullRequestInProject(repoConfig, scanDetails); err != nil {
// Make sure status on scans are passed to show in the summary
issuesCollection.AppendStatus(projectIssues.ScanStatus)
if projectIssues != nil {
// Make sure status on scans are passed to show in the summary
issuesCollection.AppendStatus(projectIssues.ScanStatus)
}
return
}
issuesCollection.Append(projectIssues)
Expand Down

0 comments on commit 778ee05

Please sign in to comment.