Count downloads for tag archives

This commit is contained in:
JakobDev 2024-04-02 16:34:57 +02:00
parent f8a5d6872c
commit 613e5387c5
22 changed files with 469 additions and 95 deletions

View file

@ -8,6 +8,7 @@ import (
"sort"
"strings"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/util"
)
@ -20,13 +21,14 @@ const (
// Tag represents a Git tag.
type Tag struct {
Name string
ID ObjectID
Object ObjectID // The id of this commit object
Type string
Tagger *Signature
Message string
Signature *ObjectSignature
Name string
ID ObjectID
Object ObjectID // The id of this commit object
Type string
Tagger *Signature
Message string
Signature *ObjectSignature
ArchiveDownloadCount *api.TagArchiveDownloadCount
}
// Commit return the commit of the tag reference