#!/usr/bin/env node 'use strict'; 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 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 = ''; // Labels that opt an issue out of the version gate. const EXEMPT_LABELS = ['version-exempt']; // Heading GitHub renders for the bug template's `label: MSD Version` field. // Issue Forms render input labels as `###