File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -941,7 +941,7 @@ func Routes() *web.Route {
941941 m .Get ("/refs/*" , repo .GetGitRefs )
942942 m .Get ("/trees/{sha}" , context .RepoRefForAPI , repo .GetTree )
943943 m .Get ("/blobs/{sha}" , context .RepoRefForAPI , repo .GetBlob )
944- m .Get ("/tags/{sha}" , context .RepoRefForAPI , repo .GetTag )
944+ m .Get ("/tags/{sha}" , context .RepoRefForAPI , repo .GetAnnotatedTag )
945945 }, reqRepoReader (models .UnitTypeCode ))
946946 m .Group ("/contents" , func () {
947947 m .Get ("" , repo .GetContentsList )
Original file line number Diff line number Diff line change @@ -64,9 +64,9 @@ func ListTags(ctx *context.APIContext) {
6464 ctx .JSON (http .StatusOK , & apiTags )
6565}
6666
67- // GetTag get the tag of a repository.
68- func GetTag (ctx * context.APIContext ) {
69- // swagger:operation GET /repos/{owner}/{repo}/git/tags/{sha} repository GetTag
67+ // GetAnnotatedTag get the tag of a repository.
68+ func GetAnnotatedTag (ctx * context.APIContext ) {
69+ // swagger:operation GET /repos/{owner}/{repo}/git/tags/{sha} repository GetAnnotatedTag
7070 // ---
7171 // summary: Gets the tag object of an annotated tag (not lightweight tags)
7272 // produces:
@@ -100,11 +100,11 @@ func GetTag(ctx *context.APIContext) {
100100 }
101101
102102 if tag , err := ctx .Repo .GitRepo .GetAnnotatedTag (sha ); err != nil {
103- ctx .Error (http .StatusBadRequest , "GetTag " , err )
103+ ctx .Error (http .StatusBadRequest , "GetAnnotatedTag " , err )
104104 } else {
105105 commit , err := tag .Commit ()
106106 if err != nil {
107- ctx .Error (http .StatusBadRequest , "GetTag " , err )
107+ ctx .Error (http .StatusBadRequest , "GetAnnotatedTag " , err )
108108 }
109109 ctx .JSON (http .StatusOK , convert .ToAnnotatedTag (ctx .Repo .Repository , tag , commit ))
110110 }
You can’t perform that action at this time.
0 commit comments