Skip to content

Allow the transition of a pre-release release to a normal release #6853

@kamal

Description

@kamal

Describe the feature or problem you’d like to solve

Given a release marked as pre-release, I'd like to use gh release edit <release name> --prerelease false to mark the release as a normal release. The option currently does not accept a value.

My initial attempt was to try to mark the release as latest using the --latest flag. This matches our release process where a release is marked pre-release while in staging, and then updated to latest when deployed to production. The API does not like this and returns the error

HTTP 422: Validation Failed (https://api.github.com/repositories/346806128/releases/88902091)
Latest release cannot be draft or prerelease.

Proposed solution

Some options:

  1. gh release edit --prerelease accepts a value to mark it as pre-release false.
  2. Add a --release flag that marks the pre-release flag to "final".

Additional context

This behavior might also be useful to apply to draft releases as there appears to be no way to transition a draft release via the CLI either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions