Skip to content

Commit 1cdc09f

Browse files
committed
fix: add analysis_execution_time in the OSSF Scorecard mapper
1 parent 8e2ac1d commit 1cdc09f

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

__tests__/__snapshots__/providers.test.js.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ exports[`GitHub Provider mappers Should map repository data correctly 1`] = `
117117

118118
exports[`OSSF Provider mappers Should map scorecard data correctly 1`] = `
119119
{
120+
"analysis_execution_time": 19876,
120121
"analysis_score": 6,
121122
"analysis_time": "2024-12-11T23:55:17Z",
122123
"binary_artifacts_details": undefined,

__tests__/providers.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe('OSSF Provider', () => {
4545
})
4646
describe('mappers', () => {
4747
it('Should map scorecard data correctly', () => {
48-
const mappedData = ossf.mappers.result(sampleOSSFScorecardResult)
48+
const mappedData = ossf.mappers.result({...sampleOSSFScorecardResult, analysis_execution_time: 19876})
4949
expect(mappedData).toMatchSnapshot()
5050
})
5151
})

src/providers/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ const ossf = {
169169
output[`${checkName}_documentation`] = check.documentation?.short
170170
output[`${checkName}_details`] = check.details?.join('\n')
171171
})
172+
output.analysis_execution_time = data.analysis_execution_time
172173
return output
173174
}
174175
}

0 commit comments

Comments
 (0)