mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-20 16:10:50 +00: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:
parent
08f4b3f312
commit
eb324a9402
4 changed files with 132 additions and 37 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue