GetLabelsInRepoByIDs returns a list of labels by IDs in given repository, it silently ignores label IDs that are not belong to the repository.
(repoID int64, labelIDs []int64)
| 180 | // GetLabelsInRepoByIDs returns a list of labels by IDs in given repository, |
| 181 | // it silently ignores label IDs that are not belong to the repository. |
| 182 | func GetLabelsInRepoByIDs(repoID int64, labelIDs []int64) ([]*Label, error) { |
| 183 | labels := make([]*Label, 0, len(labelIDs)) |
| 184 | return labels, x.Where("repo_id = ?", repoID).In("id", tool.Int64sToStrings(labelIDs)).Asc("name").Find(&labels) |
| 185 | } |
| 186 | |
| 187 | // GetLabelsByRepoID returns all labels that belong to given repository by ID. |
| 188 | func GetLabelsByRepoID(repoID int64) ([]*Label, error) { |
no test coverage detected