mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-23 10:45:16 +00:00
feat(ui): add links to review request targets in issue comments (#8239)
- Add links to review request targets in issue comments - Fix links to ghost users/orgs/teams to be empty Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8239 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Robert Wolff <mahlzahn@posteo.de> Co-committed-by: Robert Wolff <mahlzahn@posteo.de>
This commit is contained in:
parent
82daae4c7c
commit
7643bdd2b5
11 changed files with 256 additions and 21 deletions
|
@ -4,6 +4,7 @@
|
|||
package issues
|
||||
|
||||
import (
|
||||
"context"
|
||||
"slices"
|
||||
|
||||
"forgejo.org/models/organization"
|
||||
|
@ -374,3 +375,10 @@ func (t *RequestReviewTarget) Type() string {
|
|||
}
|
||||
return "team"
|
||||
}
|
||||
|
||||
func (t *RequestReviewTarget) Link(ctx context.Context) string {
|
||||
if t.User != nil {
|
||||
return t.User.HomeLink()
|
||||
}
|
||||
return t.Team.Link(ctx)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue