Skip to content

Commit 0af2f73

Browse files
authored
Merge pull request #65 from UlisesGascon/fix/last-relese
fix: added 2.0.0-beta6 build
2 parents d52f37a + 495847f commit 0af2f73

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

dist/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27756,6 +27756,7 @@ const generateScores = async ({ scope, database: currentDatabase, maxRequestInPa
2775627756
if (storedScore) {
2775727757
scoreData.prevScore = storedScore.score
2775827758
scoreData.prevDate = storedScore.date
27759+
scoreData.prevCommit = storedScore.commit
2775927760

2776027761
if (storedScore.score !== score) {
2776127762
scoreData.currentDiff = parseFloat((score - storedScore.score).toFixed(1))
@@ -27834,10 +27835,13 @@ const saveScore = ({ database, platform, org, repo, score, date, commit }) => {
2783427835
repoRef.current = { score, date, commit }
2783527836
}
2783627837

27837-
const generateReportUrl = reportTool => (org, repo, commit) => {
27838-
if (reportTool === 'scorecard-visualizer') {
27838+
const generateReportUrl = reportTool => (org, repo, commit, prevCommit) => {
27839+
if (reportTool === 'scorecard-visualizer' && !prevCommit) {
2783927840
return `https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/${org}/${repo}/commit/${commit}`
2784027841
}
27842+
if (reportTool === 'scorecard-visualizer' && prevCommit) {
27843+
return `https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/${org}/${repo}/compare/${prevCommit}/${commit}`
27844+
}
2784127845
return `https://deps.dev/project/github/${org.toLowerCase()}%2F${repo.toLowerCase()}`
2784227846
}
2784327847

dist/issue.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ Please review the following changes and take action if necessary.
99
There are changes in the following repositories:
1010

1111
<%_ if (scores.length) { -%>
12-
| Repository | Commit | Score | Difference | Report Link | StepSecurity Link |
12+
| Repository | Commit | Score | Score Delta | Report | StepSecurity |
1313
| -- | -- | -- | -- | -- | -- |
1414
<%_ } -%>
1515
<%_ scores.forEach( score => { -%>
16-
| [<%= score.org %>/<%= score.repo %>](https://<%= score.platform %>/<%= score.org %>/<%= score.repo %>) | [<%= score.commit.slice(0, 7) %>](https://<%= score.platform %>/<%= score.org %>/<%= score.repo %>/commit/<%= score.commit %>) | <% if (!renderBadge) { -%><%= score.score %> <%_ } -%> <%_ if (renderBadge) { -%> [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/<%= score.org %>/<%= score.repo %>/badge)](https://api.securityscorecards.dev/projects/github.com/<%= score.org %>/<%= score.repo %>) <%_ } -%> | <%= score.currentDiff || 0 %> | [Full Report](<%= getReportUrl(score.org, score.repo, score.commit) %>) | [Fix it](https://app.stepsecurity.io/securerepo?repo=<%= score.org %>/<%= score.repo %>) |
16+
| [<%= score.org %>/<%= score.repo %>](https://<%= score.platform %>/<%= score.org %>/<%= score.repo %>) | [<%= score.commit.slice(0, 7) %>](https://<%= score.platform %>/<%= score.org %>/<%= score.repo %>/commit/<%= score.commit %>) | <% if (!renderBadge) { -%><%= score.score %> <%_ } -%> <%_ if (renderBadge) { -%> [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/<%= score.org %>/<%= score.repo %>/badge)](https://api.securityscorecards.dev/projects/github.com/<%= score.org %>/<%= score.repo %>) <%_ } -%> | <%= score.currentDiff || 0 %><%_ if (score.prevCommit) { -%> / [Details](<%= getReportUrl(score.org, score.repo, score.commit, score.prevCommit) %>)<%_ } -%> | [View](<%= getReportUrl(score.org, score.repo, score.commit) %>) | [Fix it](https://app.stepsecurity.io/securerepo?repo=<%= score.org %>/<%= score.repo %>) |
1717
<%_ }); -%>
1818
1919
_Report generated by [UlisesGascon/openssf-scorecard-monitor](https://github.com/UlisesGascon/openssf-scorecard-monitor)._

dist/report.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<%_ } -%>
66

77
<%_ if (scores.length) { -%>
8-
| Repository | Commit | Score | Date | Difference | Report Link | StepSecurity Link |
8+
| Repository | Commit | Score | Date | Score Delta | Report | StepSecurity |
99
| -- | -- | -- | -- | -- | -- | -- |
1010
<%_ } -%>
1111
<%_ scores.forEach( score => { -%>
12-
| [<%= score.org %>/<%= score.repo %>](https://<%= score.platform %>/<%= score.org %>/<%= score.repo %>) | [<%= score.commit.slice(0, 7) %>](https://<%= score.platform %>/<%= score.org %>/<%= score.repo %>/commit/<%= score.commit %>) | <% if (!renderBadge) { -%><%= score.score %> <%_ } -%><% if (renderBadge) { -%> [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/<%= score.org %>/<%= score.repo %>/badge)](https://api.securityscorecards.dev/projects/github.com/<%= score.org %>/<%= score.repo %>) <%_ } -%> | <%= score.date %> | <%= score.currentDiff || 0 %> | [Full Report](<%= getReportUrl(score.org, score.repo, score.commit) %>) | [Fix it](https://app.stepsecurity.io/securerepo?repo=<%= score.org %>/<%= score.repo %>) |
12+
| [<%= score.org %>/<%= score.repo %>](https://<%= score.platform %>/<%= score.org %>/<%= score.repo %>) | [<%= score.commit.slice(0, 7) %>](https://<%= score.platform %>/<%= score.org %>/<%= score.repo %>/commit/<%= score.commit %>) | <% if (!renderBadge) { -%><%= score.score %> <%_ } -%><% if (renderBadge) { -%> [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/<%= score.org %>/<%= score.repo %>/badge)](https://api.securityscorecards.dev/projects/github.com/<%= score.org %>/<%= score.repo %>) <%_ } -%> | <%= score.date %> | <%= score.currentDiff || 0 %> <%_ if (score.prevCommit) { -%> / [Details](<%= getReportUrl(score.org, score.repo, score.commit, score.prevCommit) %>)<%_ } -%> | [View](<%= getReportUrl(score.org, score.repo, score.commit) %>) | [Fix it](https://app.stepsecurity.io/securerepo?repo=<%= score.org %>/<%= score.repo %>) |
1313
<%_ }); -%>
1414
1515
_Report generated by [UlisesGascon/openssf-scorecard-monitor](https://github.com/UlisesGascon/openssf-scorecard-monitor)._

0 commit comments

Comments
 (0)