Skip to content
Merged
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
12 changes: 4 additions & 8 deletions src/lib/percy-api/percy-session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface PercySessionState {
orgId?: string;
}

let session: PercySessionState = {};
const session: PercySessionState = {};

// ── Setters ─────────────────────────────────────────────────────────────────

Expand Down Expand Up @@ -94,11 +94,9 @@ export function formatActiveBuild(): string {
let out = `\n### Active Build\n\n`;
out += `| | |\n|---|---|\n`;
out += `| **Build ID** | ${session.buildId} |\n`;
if (session.buildNumber)
out += `| **Build #** | ${session.buildNumber} |\n`;
if (session.buildNumber) out += `| **Build #** | ${session.buildNumber} |\n`;
if (session.buildUrl) out += `| **URL** | ${session.buildUrl} |\n`;
if (session.buildBranch)
out += `| **Branch** | ${session.buildBranch} |\n`;
if (session.buildBranch) out += `| **Branch** | ${session.buildBranch} |\n`;
return out;
}

Expand All @@ -108,9 +106,7 @@ export function formatSessionSummary(): string {
const masked = session.projectToken
? `****${session.projectToken.slice(-4)}`
: "";
parts.push(
`**Project:** ${session.projectName} (${masked})`,
);
parts.push(`**Project:** ${session.projectName} (${masked})`);
}
if (session.buildId) {
parts.push(
Expand Down