diff options
author | sebastian-sauer <sauer.sebastian@gmail.com> | 2023-08-03 23:28:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-04 00:28:21 +0300 |
commit | 70647bd04ccabcedc32bb92a0dd24502b93a4f59 (patch) | |
tree | 9f95518b1ed6b6b334c82838e8823d44d78ac754 /models | |
parent | d74c2228e3f93de502aa37095a00421ca67c4ca9 (diff) | |
download | gitea-70647bd04ccabcedc32bb92a0dd24502b93a4f59.tar.gz gitea-70647bd04ccabcedc32bb92a0dd24502b93a4f59.zip |
Use yellow if an approved review is stale (#26312)
By using a different color it's clear that the review isn't pointing to
the latest commit.
**Screenshots:**
Not stale review:

Stale review:

fixes #26306
Diffstat (limited to 'models')
-rw-r--r-- | models/issues/review.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/models/issues/review.go b/models/issues/review.go index b2736044fc..cae3ef1d39 100644 --- a/models/issues/review.go +++ b/models/issues/review.go @@ -192,6 +192,9 @@ func (r *Review) LoadAttributes(ctx context.Context) (err error) { func (r *Review) HTMLTypeColorName() string { switch r.Type { case ReviewTypeApprove: + if r.Stale { + return "yellow" + } return "green" case ReviewTypeComment: return "grey" |