mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-02 14:02:51 +09:00
[API] Add repoGetTag (#16166)
* GetTag -> GetAnnotatedTag * API: Add repoGetTag * fix swagger docs * support "/" as tag name char Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
@ -779,8 +779,9 @@ func Routes() *web.Route {
|
||||
}, reqToken(), reqAdmin())
|
||||
m.Group("/tags", func() {
|
||||
m.Get("", repo.ListTags)
|
||||
m.Get("/*", repo.GetTag)
|
||||
m.Post("", reqRepoWriter(models.UnitTypeCode), bind(api.CreateTagOption{}), repo.CreateTag)
|
||||
m.Delete("/{tag}", repo.DeleteTag)
|
||||
m.Delete("/*", repo.DeleteTag)
|
||||
}, reqRepoReader(models.UnitTypeCode), context.ReferencesGitRepo(true))
|
||||
m.Group("/keys", func() {
|
||||
m.Combo("").Get(repo.ListDeployKeys).
|
||||
@ -945,7 +946,7 @@ func Routes() *web.Route {
|
||||
m.Get("/refs/*", repo.GetGitRefs)
|
||||
m.Get("/trees/{sha}", context.RepoRefForAPI, repo.GetTree)
|
||||
m.Get("/blobs/{sha}", context.RepoRefForAPI, repo.GetBlob)
|
||||
m.Get("/tags/{sha}", context.RepoRefForAPI, repo.GetTag)
|
||||
m.Get("/tags/{sha}", context.RepoRefForAPI, repo.GetAnnotatedTag)
|
||||
}, reqRepoReader(models.UnitTypeCode))
|
||||
m.Group("/contents", func() {
|
||||
m.Get("", repo.GetContentsList)
|
||||
|
Reference in New Issue
Block a user