fix: hackerone hacktivity replace null severity (#3946)

This commit is contained in:
imlonghao
2020-02-09 20:08:25 +08:00
committed by GitHub
parent c6b0e2a4d0
commit 0147719b4f

View File

@@ -32,7 +32,7 @@ module.exports = async (ctx) => {
const author = item.node.reporter.username;
const vendor = item.node.team.name;
const state = item.node.report.substate.replace(/^[a-z]/g, (L) => L.toUpperCase());
const severity = item.node.severity_rating.replace(/^[a-z]/g, (L) => L.toUpperCase());
const severity = item.node.severity_rating ? item.node.severity_rating.replace(/^[a-z]/g, (L) => L.toUpperCase()) : 'No Rating';
const awarded = item.node.total_awarded_amount ? item.node.total_awarded_amount : 0;
return {
title: item.node.report.title,