Skip to content

Differentiate between releases and pre-releases #2239

Closed

Description

@mattnelson

Releases can be created from tags, which can then be further classified as pre-release or the default of the latest release.
Screen Shot 2019-07-15 at 6 47 35 PM

The latest release widget displays a release marked as pre-release as the latest release.
Screen Shot 2019-07-15 at 6 46 31 PM

The API supports the ability to differentiate between the two.
https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository

Activity

  1. sindresorhus commented on Jul 21, 2019

    @sindresorhus
    Member

    PR welcome :)

  2. fregante commented on Jul 22, 2019

    @fregante
    Member

    The Tags endpoint doesn’t include this info and the Releases endpoint doesn’t include all tags (so it would only work if a repo uses releases)

    This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the Repository Tags API.

    The Tag object doesn’t include references to the related release either: https://developer.github.com/v4/object/tag/

    The only way to do this seems to be making 2 queries and then check filter out any tags that are in prereleases.

    More generically, I think we can just exclude tags that include - which seems to be used for prereleases

  3. added
    small
    on Mar 19, 2020
  4. kidonng commented on Mar 19, 2020

    @kidonng
    Member

    we can just exclude tags that include -

    Quite a few repos have dates in their tag names (for example YYYY-MM-DD).

  5. fregante commented on Mar 20, 2020

    @fregante
    Member

    I think we already have a condition that excludes tags that aren’t “version-like”

    We’ll never catch all the edge cases but, maybe:

    • exclude specifically x.y-b and x.y.z-b tags
    • in our existing v4 query, also check if we have information about a tag being a pre-release or “latest release” The first one is enough
  6. self-assigned this
    on Mar 20, 2020
  7. fregante commented on Mar 20, 2020

    @fregante
    Member

    This is why we can't use GitHub's "latest release" feature:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

acceptedenhancementsmall

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions