{"record":{"id":"48c13351caf1119e","repo":"oven-sh/bun","slug":"github-issue-body-must-be-set-48c133","errorCode":null,"errorMessage":"GITHUB_ISSUE_BODY must be set","messagePattern":"GITHUB_ISSUE_BODY must be set","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/read-issue.ts","lineNumber":4,"sourceCode":"const body = process.env.GITHUB_ISSUE_BODY;\n\nif (!body) {\n  throw new Error(\"GITHUB_ISSUE_BODY must be set\");\n}\n\nconst labels: string[] = [];\nlet command = \"\";\nif (body.includes(\"[TestCommand]\")) {\n  command = \"jest\";\n} else if (body.includes(\"[BuildCommand]\")) {\n  command = \"bundler\";\n} else if (body.includes(\"[InstallCommand]\") || body.includes(\"[AddCommand]\") || body.includes(\"[RemoveCommand]\")) {\n  command = \"npm\";\n}\n\nlet featuresLine = \"\";\nconst featuresI = body.indexOf(\"\\nFeatures: \");\nconst featuresEndI = body.indexOf(\"\\n\", featuresI + 1);\nif (featuresI > -1 && featuresEndI > -1) {\n  featuresLine = body.slice(featuresI + 1, featuresEndI).trim();\n}","sourceCodeStart":1,"sourceCodeEnd":22,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/scripts/read-issue.ts#L1-L22","documentation":"Guard in the issue-triage script: it reads the GitHub issue body from GITHUB_ISSUE_BODY (injected by the workflow) to classify a bug report by its [TestCommand]/[BuildCommand]/etc. checkboxes. It fires when the script is run outside that workflow context, leaving nothing to classify.","triggerScenarios":"Thrown at scripts/read-issue.ts:4 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set GITHUB_ISSUE_BODY to the issue body text before running","Run the script from the GitHub workflow that provides the variable"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","contentChangedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}