Skip to content

Commit 581312e

Browse files
authoredJun 19, 2024··
fix: use correct memory address to override (#820)
* fix: use correct memory address to override * fix: consider h1report data on getSummary
1 parent 6b81ecf commit 581312e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed
 

‎lib/security-release/security-release.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ export async function getSupportedVersions() {
8888
}
8989

9090
export function getSummary(report) {
91-
const { data } = report;
92-
const summaryList = data?.relationships?.summaries?.data;
91+
const summaryList = report?.relationships?.summaries?.data;
9392
if (!summaryList?.length) return;
9493
const summaries = summaryList.filter((summary) => summary?.attributes?.category === 'team');
9594
if (!summaries?.length) return;

‎lib/update_security_release.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default class UpdateSecurityRelease {
3232
});
3333
const req = new Request(credentials);
3434
for (let i = 0; i < content.reports.length; ++i) {
35-
let report = content.reports[i];
35+
const report = content.reports[i];
3636
const { data } = await req.getReport(report.id);
3737
const reportSeverity = getReportSeverity(data);
3838
const summaryContent = getSummary(data);
@@ -42,7 +42,7 @@ export default class UpdateSecurityRelease {
4242
prURL = data.relationships.custom_field_values.data[0].attributes.value;
4343
}
4444

45-
report = {
45+
content.reports[i] = {
4646
...report,
4747
title: data.attributes.title,
4848
cveIds: data.attributes.cve_ids,

0 commit comments

Comments
 (0)
Please sign in to comment.