refactor: hard-fork GSD -> MSD (Make Software Done)
Mechanical rename produced by scripts/msd-rename.cjs: gsd/Gsd/GSD -> msd/Msd/MSD across contents and paths, upstream package/repo coordinates -> @golem15/msd-core and golem15com/msd-core. Deep links into upstream history, sibling upstream packages, the GSD-2 import feature, CHANGELOG.md and .changeset/ are kept as-is. Hand edits on top: MSD block-letter banner and logos, LICENSE copyright line, package/plugin identity, regenerated lockfile, install-tree fixtures, derived registries and benchmark baseline; migration checksum baseline re-locked (MSD keeps its own install state, so no install had applied the old sums); sort-order and regex-escaped expectations in tests adjusted.
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
const { PACKAGE_NAME } = require('../gsd-core/bin/lib/package-identity.cjs');
|
||||
const { PACKAGE_NAME } = require('../msd-core/bin/lib/package-identity.cjs');
|
||||
|
||||
/**
|
||||
* Version gate for bug-report issues.
|
||||
*
|
||||
* GitHub Issue Forms enforce `required: true` only in the web form; issues
|
||||
* filed via the REST API, `gh issue create`, or automated/AI reporters can
|
||||
* omit the GSD Version field entirely. This module provides the pure logic
|
||||
* omit the MSD Version field entirely. This module provides the pure logic
|
||||
* for detecting bug reports missing a usable version so a workflow can
|
||||
* auto-close them. See .github/workflows/version-gate.yml.
|
||||
*/
|
||||
|
||||
const BUG_LABEL = 'bug';
|
||||
const NEEDS_VERSION_LABEL = 'needs-version';
|
||||
const VERSION_GATE_MARKER = '<!-- gsd-version-gate -->';
|
||||
const VERSION_GATE_MARKER = '<!-- msd-version-gate -->';
|
||||
|
||||
// Labels that opt an issue out of the version gate.
|
||||
const EXEMPT_LABELS = ['version-exempt'];
|
||||
|
||||
// Heading GitHub renders for the bug template's `label: GSD Version` field.
|
||||
// Heading GitHub renders for the bug template's `label: MSD Version` field.
|
||||
// Issue Forms render input labels as `### <label>`; matches the exact heading
|
||||
// `### GSD Version` (any heading level) — bare `### Version` is NOT matched.
|
||||
const VERSION_HEADING_RE = /^#{1,6}\s*GSD\s+Version\s*$/i;
|
||||
// `### MSD Version` (any heading level) — bare `### Version` is NOT matched.
|
||||
const VERSION_HEADING_RE = /^#{1,6}\s*MSD\s+Version\s*$/i;
|
||||
|
||||
// GitHub's placeholder for an empty optional form field.
|
||||
const NO_RESPONSE_RE = /^_no response_$/i;
|
||||
@@ -52,7 +52,7 @@ function isBugReport({ labels, body } = {}) {
|
||||
// Labels are authoritative: if any label was applied and it isn't `bug`,
|
||||
// this is not a bug report (e.g. an `enhancement`-labeled issue that happens
|
||||
// to contain a version heading must not be gated). Only fall back to the
|
||||
// bug-template's `### GSD Version` heading for fully unlabeled submissions
|
||||
// bug-template's `### MSD Version` heading for fully unlabeled submissions
|
||||
// (bare REST API / `gh issue create`).
|
||||
if (names.length > 0) return false;
|
||||
return hasVersionHeading(body);
|
||||
@@ -66,7 +66,7 @@ function hasVersionHeading(body) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract the value beneath the "GSD Version" heading. Returns null when the
|
||||
* Extract the value beneath the "MSD Version" heading. Returns null when the
|
||||
* section is absent, '' when the section is present but empty.
|
||||
*/
|
||||
function extractVersion(body) {
|
||||
@@ -111,7 +111,7 @@ function evaluateVersionGate({ labels, body } = {}) {
|
||||
function renderCloseComment() {
|
||||
return [
|
||||
VERSION_GATE_MARKER,
|
||||
'Closing automatically — this bug report does not include a valid **GSD Version**.',
|
||||
'Closing automatically — this bug report does not include a valid **MSD Version**.',
|
||||
'',
|
||||
'A version is required to reproduce and triage bugs. Grab it with one of:',
|
||||
'',
|
||||
|
||||
Reference in New Issue
Block a user