dashboard / git-pr / fix: log admin as closer #10 rss

reviewed · opened on 2024-07-22T17:56:38Z by jolheiser
Help
# add changes to patch request
git format-patch main --stdout | ssh pr.pico.sh pr add 10
# add review to patch request
git format-patch main --stdout | ssh pr.pico.sh pr add --review 10
# remove patchset
ssh pr.pico.sh ps rm ps-x
# checkout all patches
ssh pr.pico.sh pr print 10 | git am -3
# print a diff between the last two patches in a patch request
ssh pr.pico.sh pr diff 10
# accept PR
ssh pr.pico.sh pr accept 10
# close PR
ssh pr.pico.sh pr close 10

Logs

jolheiser created pr with ps-17 on 2024-07-22T16:07:15Z
erock changed status on 2024-07-22T18:11:16Z {"status":"accepted"}

Patchsets

ps-17 by jolheiser on 2024-07-22T16:07:15Z

Patchset ps-17

fix: use eventlog time for pr details

jolheiser
2024-07-22T16:06:49Z
web.go
+2 -2
Back to top

fix: use eventlog time for pr details

Signed-off-by: jolheiser <git@jolheiser.com>
web.go link
+2 -2
 1diff --git a/web.go b/web.go
 2index 2e9fed5..95612c6 100644
 3--- a/web.go
 4+++ b/web.go
 5@@ -476,7 +476,7 @@ func prDetailHandler(w http.ResponseWriter, r *http.Request) {
 6 		w.WriteHeader(http.StatusUnprocessableEntity)
 7 		return
 8 	}
 9-	slices.SortFunc[[]*EventLog](logs, func(a *EventLog, b *EventLog) int {
10+	slices.SortFunc(logs, func(a *EventLog, b *EventLog) int {
11 		return a.CreatedAt.Compare(b.CreatedAt)
12 	})
13 
14@@ -498,7 +498,7 @@ func prDetailHandler(w http.ResponseWriter, r *http.Request) {
15 				IsAdmin: web.Backend.IsAdmin(pk),
16 				Pubkey:  user.Pubkey,
17 			},
18-			Date: pr.CreatedAt.Format(web.Backend.Cfg.TimeFormat),
19+			Date: eventlog.CreatedAt.Format(web.Backend.Cfg.TimeFormat),
20 		})
21 	}
22