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

Function GetLabelsByRepoID

internal/database/issue_label.go:188–191  ·  view source on GitHub ↗

GetLabelsByRepoID returns all labels that belong to given repository by ID.

(repoID int64)

Source from the content-addressed store, hash-verified

186
187// GetLabelsByRepoID returns all labels that belong to given repository by ID.
188func GetLabelsByRepoID(repoID int64) ([]*Label, error) {
189 labels := make([]*Label, 0, 10)
190 return labels, x.Where("repo_id = ?", repoID).Asc("name").Find(&labels)
191}
192
193func getLabelsByIssueID(e Engine, issueID int64) ([]*Label, error) {
194 issueLabels, err := getIssueLabels(e, issueID)

Callers 4

RetrieveLabelsFunction · 0.92
RetrieveRepoMetasFunction · 0.92
viewIssueFunction · 0.92
ListLabelsFunction · 0.92

Calls 2

WhereMethod · 0.80
FindMethod · 0.65

Tested by

no test coverage detected