Skip to content

Commit

Permalink
chore: Update FoD/SSC github-pr-comment actions
Browse files Browse the repository at this point in the history
chore: Remove unused code

fix: FoD/SSC: Improve `github-pr-comment` action output
  • Loading branch information
rsenden committed Aug 21, 2024
1 parent 4f40a04 commit 694e7ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ steps:
- if: ${(issue.status=='New' || issue.status=='Reopen')}
name: newIssues
valueTemplate: mdIssueListItem
- if: ${(issue.status=='New' || issue.status=='Reopen') && issue.engineType=='Static'}
name: jsonSourceCodeComments
valueTemplate: jsonSourceCodeComment

- progress: Generating GitHub request
- set:
Expand Down Expand Up @@ -125,7 +122,6 @@ valueTemplates:
# For now, we don't include any source code comments, as this will cause
# GitHub to return an error if the source file doesn't exist in the repo.
comments: ${{}}
# comments: ${jsonSourceCodeComments?:{}}

- name: reviewBody
contents: |
Expand All @@ -143,19 +139,8 @@ valueTemplates:
? "* No removed issues were detected"
: ("* "+#join('\n* ',removedIssues))}
- name: jsonSourceCodeComment
contents:
path: ${issue.primaryLocationFull}
line: ${issue.lineNumber==0?1:issue.lineNumber}
body: |
<p><b>Security Scanning</b> / Fortify SAST</p>
<h3>${issue.severityString} - ${issue.category} </h3>
<p>${#htmlToText(issue.details?.summary)}</p>
<br>
<p><a href=${#fod.issueBrowserUrl(issue)} target="_blank" rel="noopener noreferrer">More information</a></p>
- name: mdIssueListItem
contents: >
${issue.status} (${issue.scantype}): [${issue.primaryLocationFull}${issue.lineNumber==null?'':':'+issue.lineNumber} - ${issue.category}](${#fod.issueBrowserUrl(issue)})
contents: "${issue.status} (${issue.scantype}) - ${issue.category}: \n[${issue.primaryLocationFull}${issue.lineNumber==null?'':':'+issue.lineNumber}](${#fod.issueBrowserUrl(issue)})"



Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ steps:
- if: ${(issue.scanStatus=='NEW' || issue.scanStatus=='REINTRODUCED')}
name: newIssues
valueTemplate: mdIssueListItem
- if: ${(issue.scanStatus=='NEW' || issue.scanStatus=='REINTRODUCED') && issue.engineType=='SCA'}
name: jsonSourceCodeComments
valueTemplate: jsonSourceCodeComment

- progress: Generating GitHub request
- set:
Expand Down Expand Up @@ -131,7 +128,6 @@ valueTemplates:
# For now, we don't include any source code comments, as this will cause
# GitHub to return an error if the source file doesn't exist in the repo.
comments: ${{}}
# comments: ${jsonSourceCodeComments?:{}}

- name: reviewBody
contents: |
Expand All @@ -149,16 +145,6 @@ valueTemplates:
? "* No removed issues were detected"
: ("* "+#join('\n* ',removedIssues))}
- name: jsonSourceCodeComment
contents:
path: ${issue.fullFileName}
line: ${issue.lineNumber==0?1:issue.lineNumber}
body: |
<p><b>Security Scanning</b> / Fortify SAST</p>
<h3>${issue.details.friority} - ${issue.details.issueName} </h3>
<p>${issue.details.brief}</p>
<br>
<p><a href=${#ssc.issueBrowserUrl(issue,parameters.filterset)} target="_blank" rel="noopener noreferrer">More information</a></p>
- name: mdIssueListItem
contents: >
${issue.scanStatus} (${issue.engineCategory}): [${issue.fullFileName}${issue.lineNumber==null?'':':'+issue.lineNumber} - ${issue.issueName}](${#ssc.issueBrowserUrl(issue,parameters.filterset)})
contents: "${issue.scanStatus} (${issue.engineCategory}) - ${issue.issueName}: \n[${issue.fullFileName}${issue.lineNumber==null?'':':'+issue.lineNumber}](${#ssc.issueBrowserUrl(issue,parameters.filterset)})"

0 comments on commit 694e7ae

Please sign in to comment.