import { appendFileSync, readFileSync } from 'node:fs' import { pathToFileURL } from 'node:url' // Why hardcoded: the runner has no YAML parser without a pnpm install. The // vitest drift guard fails whenever these diverge from .github/ISSUE_TEMPLATE. export const ISSUE_TEMPLATES = [ { file: 'bug_report.yml', name: 'Bug report', requiredFields: ['Operating system', 'Details'] }, { file: 'feature_request.yml', name: 'Feature request', requiredFields: ['Problem or use case', 'Proposed solution'] }, { file: 'other.yml', name: 'Other', requiredFields: ['Details'] } ] export const COMPLIANCE_LABEL = 'needs-template' export const COMMENT_MARKER = '' // Why: GitHub renders a skipped optional form field as this literal. const EMPTY_FIELD_VALUE = '_No response_' // Issue forms render each field as `###