Skip to content

Commit 5a87bab

Browse files
Add documentation to functions
Signed-off-by: David Svantesson <[email protected]>
1 parent 6965aa8 commit 5a87bab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

routers/api/v1/repo/topic.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"code.gitea.io/gitea/routers/api/v1/convert"
1616
)
1717

18+
// ListTopics returns list of current topics for repo
1819
func ListTopics(ctx *context.APIContext) {
1920
// swagger:operation GET /repos/{owner}/{repo}/topics repository repoListTopics
2021
// ---
@@ -56,6 +57,7 @@ func ListTopics(ctx *context.APIContext) {
5657
})
5758
}
5859

60+
// HasTopic check if repo has topic name
5961
func HasTopic(ctx *context.APIContext) {
6062
// swagger:operation GET /repos/{owner}/{repo}/topics/{topic} repository repoHasTopic
6163
// ---
@@ -106,6 +108,7 @@ func HasTopic(ctx *context.APIContext) {
106108
})
107109
}
108110

111+
// AddTopic adds a topic name to a repo
109112
func AddTopic(ctx *context.APIContext) {
110113
// swagger:operation PUT /repos/{owner}/{repo}/topics/{topic} repository repoAddTopíc
111114
// ---
@@ -153,6 +156,7 @@ func AddTopic(ctx *context.APIContext) {
153156
})
154157
}
155158

159+
// DeleteTopic removes topic name from repo
156160
func DeleteTopic(ctx *context.APIContext) {
157161
// swagger:operation DELETE /repos/{owner}/{repo}/topics/{topic} repository repoDeleteTopic
158162
// ---

0 commit comments

Comments
 (0)