Skip to content

Noninteractively use Git tag message as release notes with gh release create #6718

@br3ndonland

Description

@br3ndonland

Describe the feature or problem you'd like to solve

When creating GitHub releases with the gh release create command, I would like to use messages from pre-existing annotated Git tags as release notes.

It seems like there's a way to do this interactively:

case "Write using git tag message as template":
openEditor = true
editorContents = tagDescription

Can I noninteractively create a release with the Git tag message?

There's a --notes option, but it accepts a string and doesn't seem to auto-populate with the Git tag message. I could use a git show command I guess, but that would include additional metadata like the commit diff.

There's also a --notes-start-tag option, but I think that's supposed to be used with --generate-notes to automatically generate release notes based on a list of PRs, not tags (?)

Proposed solution

Add an option --notes-from-tag, which would automatically populate the release notes with the message in the tag specified by gh release create [<tag>].

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIhelp wantedContributions welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions