mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-29 06:00:03 +02:00
feat: combine review requests comments
- Combine review requests comments similairy how labels comments are combined. If review requests comments were made within 60 seconds of each other they will be grouped. - Integration and unit test added. - Resolves #2774
This commit is contained in:
parent
aa86e94853
commit
8fdc0a7a6c
9 changed files with 685 additions and 65 deletions
|
@ -262,3 +262,15 @@ func RenderLabels(ctx context.Context, locale translation.Locale, labels []*issu
|
|||
htmlCode += "</span>"
|
||||
return template.HTML(htmlCode)
|
||||
}
|
||||
|
||||
func RenderReviewRequest(users []issues_model.RequestReviewTarget) template.HTML {
|
||||
usernames := make([]string, 0, len(users))
|
||||
for _, user := range users {
|
||||
usernames = append(usernames, template.HTMLEscapeString(user.Name()))
|
||||
}
|
||||
|
||||
htmlCode := `<span class="review-request-list">`
|
||||
htmlCode += strings.Join(usernames, ", ")
|
||||
htmlCode += "</span>"
|
||||
return template.HTML(htmlCode)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue