{"record":{"id":"ee773984e9e3c995","repo":"oven-sh/bun","slug":"github-issue-body-must-be-set","errorCode":null,"errorMessage":"GITHUB_ISSUE_BODY must be set","messagePattern":"GITHUB_ISSUE_BODY must be set","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/is-outdated.ts","lineNumber":4,"sourceCode":"import { join } from \"path\";\nconst body = process.env.GITHUB_ISSUE_BODY;\nif (!body) {\n  throw new Error(\"GITHUB_ISSUE_BODY must be set\");\n}\n\nconst latest = (await Bun.file(join(import.meta.dir, \"..\", \"LATEST\")).text()).trim();\n\n// Check if this is a standalone executable\nconst isStandalone = body.includes(\"standalone_executable\");\n\nconst lines = body.split(\"\\n\").reverse();\n\nfor (let line of lines) {\n  line = line.trim().toLowerCase();\n  if (line.startsWith(\"bun v\") && line.includes(\" on \")) {\n    const version = line.slice(\"bun v\".length, line.indexOf(\" \", \"bun v\".length)).toLowerCase().trim();\n\n    // Check if valid version\n    if (version.includes(\"canary\")) {\n      process.exit(0);\n    }","sourceCodeStart":1,"sourceCodeEnd":22,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/scripts/is-outdated.ts#L1-L22","documentation":"scripts/is-outdated.ts reads GITHUB_ISSUE_BODY to find the reporter's Bun version line and compare against LATEST; it throws immediately when the env var is unset. Note that an issue with a genuinely empty body ('') is also falsy and triggers this.","triggerScenarios":"Executing the script outside an issues/issue_comment Action context; the workflow env block omitting GITHUB_ISSUE_BODY; the triggering issue having an empty body; local invocation without exports.","commonSituations":"Manual local runs; workflow trigger changed from issues to something without a body; bot-filed issues with empty bodies.","solutions":["Set `GITHUB_ISSUE_BODY: ${{ github.event.issue.body }}` in the step env","Gate the step with an issue-event condition so empty-context runs skip it","Treat empty body as a no-op instead: exit 0 early when body is missing but the event is not an issue","For local testing, export a representative body containing a 'bun v1.x.x on ...' line"],"exampleFix":"// before\nconst body = process.env.GITHUB_ISSUE_BODY;\nif (!body) {\n  throw new Error('GITHUB_ISSUE_BODY must be set');\n}\n\n// after\nconst body = process.env.GITHUB_ISSUE_BODY;\nif (!body) {\n  if (process.env.GITHUB_ACTIONS) throw new Error('GITHUB_ISSUE_BODY must be set');\n  console.error('not running in an issue context; nothing to do');\n  process.exit(0);\n}","handlingStrategy":"validation","validationCode":"const body = process.env.GITHUB_ISSUE_BODY;\nif (!body) {\n  if (!process.env.GITHUB_ACTIONS) {\n    console.error('GITHUB_ISSUE_BODY not set; not running inside an issue event');\n    process.exit(0);\n  }\n  throw new Error('GITHUB_ISSUE_BODY must be set');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Wire `GITHUB_ISSUE_BODY: ${{ github.event.issue.body }}` in every step running is-outdated.ts","Remember an empty issue body is falsy — treat it as 'nothing to check', not an error","Keep the automation step conditioned on issue-related events only"],"tags":["github-actions","env","automation","ci"],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}