Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/security-release/security-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ export async function getSupportedVersions() {
}

export function getSummary(report) {
const { data } = report;
const summaryList = data?.relationships?.summaries?.data;
const summaryList = report?.relationships?.summaries?.data;
if (!summaryList?.length) return;
const summaries = summaryList.filter((summary) => summary?.attributes?.category === 'team');
if (!summaries?.length) return;
Expand Down
4 changes: 2 additions & 2 deletions lib/update_security_release.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class UpdateSecurityRelease {
});
const req = new Request(credentials);
for (let i = 0; i < content.reports.length; ++i) {
let report = content.reports[i];
const report = content.reports[i];
const { data } = await req.getReport(report.id);
const reportSeverity = getReportSeverity(data);
const summaryContent = getSummary(data);
Expand All @@ -42,7 +42,7 @@ export default class UpdateSecurityRelease {
prURL = data.relationships.custom_field_values.data[0].attributes.value;
}

report = {
content.reports[i] = {
...report,
title: data.attributes.title,
cveIds: data.attributes.cve_ids,
Expand Down