git-pr / fix: use eventlog time for pr details #10

accepted · opened on 2024-07-22T16:07:15Z 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

Diff ↕

fix: use eventlog time for pr details

jolheiser <git@jolheiser.com>
Signed-off-by: jolheiser <git@jolheiser.com>
 web.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 1From 60bc1d2d64ce324777f159e0914ce1e328c9a3a3 Mon Sep 17 00:00:00 2001
 2From: jolheiser <git@jolheiser.com>
 3Date: Mon, 22 Jul 2024 11:06:49 -0500
 4Subject: [PATCH] fix: use eventlog time for pr details
 5
 6Signed-off-by: jolheiser <git@jolheiser.com>
 7---
 8 web.go | 4 ++--
 9 1 file changed, 2 insertions(+), 2 deletions(-)
10
11diff --git a/web.go b/web.go
12index 2e9fed5..95612c6 100644
13--- a/web.go
14+++ b/web.go
15@@ -476,7 +476,7 @@ func prDetailHandler(w http.ResponseWriter, r *http.Request) {
16 		w.WriteHeader(http.StatusUnprocessableEntity)
17 		return
18 	}
19-	slices.SortFunc[[]*EventLog](logs, func(a *EventLog, b *EventLog) int {
20+	slices.SortFunc(logs, func(a *EventLog, b *EventLog) int {
21 		return a.CreatedAt.Compare(b.CreatedAt)
22 	})
23 
24@@ -498,7 +498,7 @@ func prDetailHandler(w http.ResponseWriter, r *http.Request) {
25 				IsAdmin: web.Backend.IsAdmin(pk),
26 				Pubkey:  user.Pubkey,
27 			},
28-			Date: pr.CreatedAt.Format(web.Backend.Cfg.TimeFormat),
29+			Date: eventlog.CreatedAt.Format(web.Backend.Cfg.TimeFormat),
30 		})
31 	}
32 
33-- 
342.45.1
35
ps-17 by jolheiser on 2024-07-22T16:07:15Z

fix: use eventlog time for pr details

jolheiser <git@jolheiser.com> 2024-07-22T16:06:49Z
Signed-off-by: jolheiser <git@jolheiser.com>
 web.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 1From 60bc1d2d64ce324777f159e0914ce1e328c9a3a3 Mon Sep 17 00:00:00 2001
 2From: jolheiser <git@jolheiser.com>
 3Date: Mon, 22 Jul 2024 11:06:49 -0500
 4Subject: [PATCH] fix: use eventlog time for pr details
 5
 6Signed-off-by: jolheiser <git@jolheiser.com>
 7---
 8 web.go | 4 ++--
 9 1 file changed, 2 insertions(+), 2 deletions(-)
10
11diff --git a/web.go b/web.go
12index 2e9fed5..95612c6 100644
13--- a/web.go
14+++ b/web.go
15@@ -476,7 +476,7 @@ func prDetailHandler(w http.ResponseWriter, r *http.Request) {
16 		w.WriteHeader(http.StatusUnprocessableEntity)
17 		return
18 	}
19-	slices.SortFunc[[]*EventLog](logs, func(a *EventLog, b *EventLog) int {
20+	slices.SortFunc(logs, func(a *EventLog, b *EventLog) int {
21 		return a.CreatedAt.Compare(b.CreatedAt)
22 	})
23 
24@@ -498,7 +498,7 @@ func prDetailHandler(w http.ResponseWriter, r *http.Request) {
25 				IsAdmin: web.Backend.IsAdmin(pk),
26 				Pubkey:  user.Pubkey,
27 			},
28-			Date: pr.CreatedAt.Format(web.Backend.Cfg.TimeFormat),
29+			Date: eventlog.CreatedAt.Format(web.Backend.Cfg.TimeFormat),
30 		})
31 	}
32 
33-- 
342.45.1
35