Exclude BLANK-000000
Test and deploy / deploy (push) Successful in 31s

This commit is contained in:
2026-07-29 10:44:09 -05:00
parent 60d0621750
commit ead6108f2a
5 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -3,7 +3,7 @@ import { mkdir, readFile, writeFile } from 'node:fs/promises';
import { dirname, join, resolve } from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
import { collectIssueFiles } from './update-products-from-issues.mjs';
import { extractIssueIds } from '../web/js/issue-id.js';
import { BLANK_ISSUE_ID, extractIssueIds } from '../web/js/issue-id.js';
const REPO_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..');
const VERSION_RE = /^(?<major>\d+)(?:\.(?<minor>\d+))?(?:\.(?<patch>\d+))?(?<rest>.*)$/;
@@ -43,6 +43,7 @@ export function buildIssuePlotProduct(product, releases) {
const points = [];
versions.forEach((version, releaseIndex) => {
for (const id of releases.get(version)) {
if (id === BLANK_ISSUE_ID) continue;
const issueNumber = Number(id.match(/-(\d+)$/)?.[1]);
if (Number.isSafeInteger(issueNumber)) points.push([releaseIndex, issueNumber, id]);
}
+1 -1
View File
@@ -22,7 +22,7 @@ Mentions PAN-999999 in the description.
test('builds compact plot points in semantic release order', () => {
const plot = buildIssuePlotProduct('PAN-OS', new Map([
['10.2.10-h1', ['PAN-130000']],
['10.2.9', ['PAN-100000', 'WF500-120000']]
['10.2.9', ['PAN-100000', 'WF500-120000', 'BLANK-000000']]
]));
assert.deepEqual(plot.releases, ['10.2.9', '10.2.10-h1']);
assert.deepEqual(plot.points, [
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -120,7 +120,7 @@ function drawPlot() {
const minimum = Math.min(...values);
const maximum = Math.max(...values);
const range = Math.max(1, maximum - minimum);
const yMin = Math.max(0, minimum - range * 0.04);
const yMin = minimum - range * 0.04;
const yMax = maximum + range * 0.04;
const xFor = position => margin.left + (
releaseIndexes.length === 1 ? plotWidth / 2 : position * plotWidth / (releaseIndexes.length - 1)