Skip to content

Commit

Permalink
Fix short summary image size (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosdon authored Aug 2, 2023
1 parent 114a5b9 commit 87e58a4
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/nowsecure-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import { SummaryTableRow } from "@actions/core/lib/summary";
import { PlatformConfig } from "./utils";
import { IssueAction, IssueActionType } from "./nowsecure-issues";

const LOGO_URL =
"https://www.nowsecure.com/wp-content/uploads/2022/03/Logo-Nowsecure.png";
const LOGO_SIZE = { width: "222", height: "40" };
const LOGO_ALT = "NowSecure Logo";

export type FindingToIssueMap = {
[index: string]: IssueAction;
};
Expand Down Expand Up @@ -43,11 +48,7 @@ export function githubJobSummaryLong(
const dependenciesTable = getDependenciesTable(assessment);

return core.summary
.addImage(
"https://www.nowsecure.com/wp-content/uploads/2022/03/Logo-Nowsecure.png",
"NowSecure Logo",
{ width: "222", height: "40" }
)
.addImage(LOGO_URL, LOGO_ALT, LOGO_SIZE)
.addHeading("Security Test Results")
.addTable(findingsTable)
.addSeparator()
Expand Down Expand Up @@ -119,10 +120,7 @@ export function githubJobSummaryShort(
.join("<br>");

return core.summary
.addImage(
"https://www.nowsecure.com/wp-content/uploads/2022/03/Logo-Nowsecure.png",
"NowSecure Logo"
)
.addImage(LOGO_URL, LOGO_ALT, LOGO_SIZE)
.addHeading("Security Test Results")
.addTable([testResultHeader, ...results])
.addDetails("Risks", formatDetail(findingsGroupedBy.fail))
Expand Down

0 comments on commit 87e58a4

Please sign in to comment.