File tree 2 files changed +6
-6
lines changed
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 {
941
941
m .Get ("/refs/*" , repo .GetGitRefs )
942
942
m .Get ("/trees/{sha}" , context .RepoRefForAPI , repo .GetTree )
943
943
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 )
945
945
}, reqRepoReader (models .UnitTypeCode ))
946
946
m .Group ("/contents" , func () {
947
947
m .Get ("" , repo .GetContentsList )
Original file line number Diff line number Diff line change @@ -64,9 +64,9 @@ func ListTags(ctx *context.APIContext) {
64
64
ctx .JSON (http .StatusOK , & apiTags )
65
65
}
66
66
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
70
70
// ---
71
71
// summary: Gets the tag object of an annotated tag (not lightweight tags)
72
72
// produces:
@@ -100,11 +100,11 @@ func GetTag(ctx *context.APIContext) {
100
100
}
101
101
102
102
if tag , err := ctx .Repo .GitRepo .GetAnnotatedTag (sha ); err != nil {
103
- ctx .Error (http .StatusBadRequest , "GetTag " , err )
103
+ ctx .Error (http .StatusBadRequest , "GetAnnotatedTag " , err )
104
104
} else {
105
105
commit , err := tag .Commit ()
106
106
if err != nil {
107
- ctx .Error (http .StatusBadRequest , "GetTag " , err )
107
+ ctx .Error (http .StatusBadRequest , "GetAnnotatedTag " , err )
108
108
}
109
109
ctx .JSON (http .StatusOK , convert .ToAnnotatedTag (ctx .Repo .Repository , tag , commit ))
110
110
}
You can’t perform that action at this time.
0 commit comments