mislav/hub · error

Aborting release due to empty release title

Error message

Aborting release due to empty release title

What it means

createRelease extracts the title/body from the interactive editor or message input and requires a non-empty title, since a GitHub release must have a name. If the extracted title is empty, it aborts with this error rather than creating a title-less release.

Source

Thrown at commands/release.go:494

text is the title and the rest is the description.`, tagName, project))

	flagReleaseMessage := args.Flag.AllValues("--message")
	if len(flagReleaseMessage) > 0 {
		messageBuilder.Message = strings.Join(flagReleaseMessage, "\n\n")
		messageBuilder.Edit = args.Flag.Bool("--edit")
	} else if args.Flag.HasReceived("--file") {
		messageBuilder.Message, err = msgFromFile(args.Flag.Value("--file"))
		utils.Check(err)
		messageBuilder.Edit = args.Flag.Bool("--edit")
	} else {
		messageBuilder.Edit = true
	}

	title, body, err := messageBuilder.Extract()
	utils.Check(err)

	if title == "" {
		utils.Check(fmt.Errorf("Aborting release due to empty release title"))
	}

	params := &github.Release{
		TagName:         tagName,
		TargetCommitish: args.Flag.Value("--commitish"),
		Name:            title,
		Body:            body,
		Draft:           args.Flag.Bool("--draft"),
		Prerelease:      args.Flag.Bool("--prerelease"),
	}

	var release *github.Release

	args.NoForward()
	if args.Noop {
		ui.Printf("Would create release `%s' for %s with tag name `%s'\n", title, project, tagName)
	} else {
		release, err = gh.CreateRelease(project, params)

View on GitHub (pinned to 5c547ed804)

Solutions

  1. Enter a title as the first line of the editor message, or pass one via the CLI title argument/flag.
  2. Fix the --file input so its first block is a non-empty title.
  3. If scripting, ensure generated release notes always emit a non-empty first line (title).

Example fix

// before: file passed to --file
""
"- fixed crash"
// after
"v1.3.0"
"- fixed crash"
Defensive patterns

Strategy: validation

Validate before calling

title, body, err := messageBuilder.Extract()
if err != nil {
    return err
}
if strings.TrimSpace(title) == "" {
    return errors.New("release requires a non-empty title (first line)")
}

Prevention

When it happens

Trigger: `gh release create` where `messageBuilder.Extract()` returns title == "" — the first line of the editor buffer was cleared, or the `--file`/message input has an empty first block.

Common situations: Deleting the prefilled title line in the editor before saving; a --file whose first line is blank; scripting releases with generated notes that produced an empty headline.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


AI-assisted analysis of mislav/hub@5c547ed804 (2026-09-01). Data as JSON: /api/errors/44cbaff3a082ca80. Report an issue: GitHub.