Skip to content

Support --previous-tag flag for generating release notes in gh release create #5963

@p1ass

Description

@p1ass

Describe the feature or problem you’d like to solve

When we create a release using Web UI, we can specify the previous tag for generating release notes.

This feature enables us to list pull requests we publish.

But, gh release create command do not support it.

Proposed solution

I propose to add the --previous-tag flag to specify the previous tag.

For example, sample repository have two tags: v1.1.0 and v1.1.1

# Use automatically generated release notes without previous tag.
# Create a diff between v1.2.0 and v1.1.1.
$ gh release create v1.2.0 --generate-notes

# Use automatically generated release notes with previous tag.
# Create a diff between v1.2.0 and v1.1.0.
$ gh release create v1.2.0 --generate-notes --previous-tag v1.1.0

Additional context

GitHub Web UI

Create Release Web UI

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