MCPcopy Create free account
hub / github.com/gogs/gogs / ClearIssueLabels

Function ClearIssueLabels

internal/route/api/v1/repo/issue_label.go:113–126  ·  view source on GitHub ↗
(c *context.APIContext)

Source from the content-addressed store, hash-verified

111}
112
113func ClearIssueLabels(c *context.APIContext) {
114 issue, err := database.GetIssueByIndex(c.Repo.Repository.ID, c.ParamsInt64(":index"))
115 if err != nil {
116 c.NotFoundOrError(err, "get issue by index")
117 return
118 }
119
120 if err := issue.ClearLabels(c.User); err != nil {
121 c.Error(err, "clear labels")
122 return
123 }
124
125 c.NoContent()
126}

Callers

nothing calls this directly

Calls 5

GetIssueByIndexFunction · 0.92
ClearLabelsMethod · 0.80
NoContentMethod · 0.80
NotFoundOrErrorMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected