Gitea: Tag tweaks

Created on 4 Nov 2020  路  6Comments  路  Source: go-gitea/gitea

  • Gitea version (or commit ref): 1.14.0+dev-148-gfb756e773
  • Git version: Whatever try uses
  • Operating system: Whatever try uses
  • Database (use [x]):

    • [ ] PostgreSQL

    • [ ] MySQL

    • [ ] MSSQL

    • [x] SQLite (does try still use SQLite, or did we change it?)

  • Can you reproduce the bug at https://try.gitea.io:
  • Log gist:
    N/A

Description

As noted in the above link, the repo has 89 _tags_, but none are _true_ Gitea releases.

Previously this was inconsequential because we showed both (and we still treat tags as releases in the DB, albeit with IsTag: true)

However, now that we distinguish tags on a separate page and added the number to the sub menu, we should specifically calculate how many _true_ releases we have vs how many are simple tags, and show them in the corresponding spot on the UI.

imo the sub menu (next to branches) should show the number of all tags (because releases are tags, but tags aren't _true_ releases)
The top menu should only show the number of _real_ releases.

The sub menu should also be renamed "tags"

Screenshots

kawa

kinui

All 6 comments

Yes, we need separate counters for both releases and tags. I guess to not add a 5th duplicating entry in the second list, it's fine to just rename that to Tags.

Yes, we need separate counters for both releases and tags. I guess to not add a 5th duplicating entry in the second list, it's fine to just rename that to Tags.

My reasoning is that the second (sub) menu relates to git data, in which case tags makes sense because git has no concept of a formal release.

Top menu calculation is the current NumReleases, but the second (sub) menu calculation is only releases where IsTag: true

My thoughts. Git does have annotated tags but I guess only 1% of users would know the difference between a lightweight and an annotated tag so I guess we follow what GitHub does here.

I do personally use annotated tags for all my releases (primarly because I can't be bothered with doing it on the GUI), maybe they can be optionally be promoted to be seen as a proper release by Gitea later e.g. COUNT_ANNOTATED_TAG_AS_RELEASE or something.

Even with annotated tags, git doesn't track attachments, pre-release, etc.

(But I do agree having a Gitea release created by pushing an annotated tag would be 馃憣 )

Once Gitea can distinguish between lightweight and annotated we could certainly revisit the counts.

One slightly related topic is also to display tags on the release list in a deemphasized form like GitHub does, I think it's a nice feature.

image

One slightly related topic is also to display tags on the release list in a deemphasized form like GitHub does, I think it's a nice feature.

I chose not to implement this in the linked PR, but I do agree it's nice to have. Might be worth adding in another PR.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fastidious picture Fastidious  路  3Comments

flozz picture flozz  路  3Comments

internalfx picture internalfx  路  3Comments

jorise7 picture jorise7  路  3Comments

thehowl picture thehowl  路  3Comments