Beispiel #1
0
func unsortedListAll(repo repository.Repo) []Summary {
	reviewNotesMap, err := repo.GetAllNotes(request.Ref)
	if err != nil {
		return nil
	}
	discussNotesMap, err := repo.GetAllNotes(comment.Ref)
	if err != nil {
		return nil
	}

	isSubmittedCheck := getIsSubmittedCheck(repo)
	var reviews []Summary
	for commit, notes := range reviewNotesMap {
		summary, err := getSummaryFromNotes(repo, commit, notes, discussNotesMap[commit])
		if err != nil {
			continue
		}
		summary.Submitted = isSubmittedCheck(summary.Request.TargetRef, summary.getStartingCommit())
		reviews = append(reviews, *summary)
	}
	return reviews
}