oven-sh/bun · error · Error

GITHUB_ISSUE_BODY must be set

Error message

GITHUB_ISSUE_BODY must be set

What it means

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.

Solutions

  1. Set GITHUB_ISSUE_BODY to the issue body text before running
  2. Run the script from the GitHub workflow that provides the variable
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at scripts/read-issue.ts:4 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16). Data as JSON: /api/errors/48c13351caf1119e. Report an issue: GitHub.

Appendix: source

Thrown at scripts/read-issue.ts:4

const body = process.env.GITHUB_ISSUE_BODY;

if (!body) {
  throw new Error("GITHUB_ISSUE_BODY must be set");
}

const labels: string[] = [];
let command = "";
if (body.includes("[TestCommand]")) {
  command = "jest";
} else if (body.includes("[BuildCommand]")) {
  command = "bundler";
} else if (body.includes("[InstallCommand]") || body.includes("[AddCommand]") || body.includes("[RemoveCommand]")) {
  command = "npm";
}

let featuresLine = "";
const featuresI = body.indexOf("\nFeatures: ");
const featuresEndI = body.indexOf("\n", featuresI + 1);
if (featuresI > -1 && featuresEndI > -1) {
  featuresLine = body.slice(featuresI + 1, featuresEndI).trim();
}

View on GitHub (pinned to 8c5296ac45)