Versions: clarify usage of Version.identifier
and Version.verbose_name
for stable and latest
#10892
Labels
Needed: design decision
A core team decision is required
What's the problem this feature will solve?
Currently, we use identifier and verbose name depending on the version type, for example:
origin/<branch name>
as the identifier).All good, but things get confusing for latest and stable, since they can be a tag or a branch.
For latest, verbose name is
latest
, and the identifier is the branch or tag name. Identifier has also a special case where it can beNone
(this signals git to use the default cloned branch).For stable, verbose name is
stable
and the identifier is the commit.Describe the solution you'd like
A) Always save the name of the branch/tag for stable and latest as the identifier. And for the special case for latest where the identifier is
None
, check instead if the version is latest and if the project has the default branch set toNone
in order to use the default cloned branch. The identifier of latest will be updated after clone (git rev-parse --abbrev-ref HEAD
can be used to get the branch name).B) Use the branch/tag name as the verbose name for stable and latest and the commit as identifier. We can already identify the version as latest/stable by checking its slug and machine attribute. For latest having the identifier set to
None
, use the same solution as above.Additional context
The text was updated successfully, but these errors were encountered: