Skip to content

Commit 70647bd

Browse files
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: ![image](https://github.com/go-gitea/gitea/assets/1135157/2901ad69-e0d8-4041-b760-277d02dafd45) Stale review: ![image](https://github.com/go-gitea/gitea/assets/1135157/500b306e-a994-42d4-a2fd-1174774ba5ee) fixes #26306
1 parent d74c222 commit 70647bd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

models/issues/review.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ func (r *Review) LoadAttributes(ctx context.Context) (err error) {
192192
func (r *Review) HTMLTypeColorName() string {
193193
switch r.Type {
194194
case ReviewTypeApprove:
195+
if r.Stale {
196+
return "yellow"
197+
}
195198
return "green"
196199
case ReviewTypeComment:
197200
return "grey"

0 commit comments

Comments
 (0)