(c *context.Context, repo *database.Repository)
| 275 | } |
| 276 | |
| 277 | func RetrieveRepoMetas(c *context.Context, repo *database.Repository) []*database.Label { |
| 278 | if !c.Repo.IsWriter() { |
| 279 | return nil |
| 280 | } |
| 281 | |
| 282 | labels, err := database.GetLabelsByRepoID(repo.ID) |
| 283 | if err != nil { |
| 284 | c.Error(err, "get labels by repository ID") |
| 285 | return nil |
| 286 | } |
| 287 | c.Data["Labels"] = labels |
| 288 | |
| 289 | RetrieveRepoMilestonesAndAssignees(c, repo) |
| 290 | if c.Written() { |
| 291 | return nil |
| 292 | } |
| 293 | |
| 294 | return labels |
| 295 | } |
| 296 | |
| 297 | func getFileContentFromDefaultBranch(c *context.Context, filename string) (string, bool) { |
| 298 | if c.Repo.Commit == nil { |
no test coverage detected