git-pr / fix: only log status change if the status changes #11

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

Logs

jolheiser created pr with ps-18 on 2024-07-22T16:35:13Z
erock added ps-22 on 2024-07-22T18:12:49Z
erock changed status on 2024-07-22T18:12:49Z {"status":"accepted"}

Patchsets

Diff ↕
Signed-off-by: jolheiser <git@jolheiser.com>
 cli.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 1From 57b42aaa4129d927427de028c0eb25cc23d981a5 Mon Sep 17 00:00:00 2001
 2From: jolheiser <git@jolheiser.com>
 3Date: Mon, 22 Jul 2024 11:34:57 -0500
 4Subject: [PATCH] fix: only log status change if the status changes
 5
 6Signed-off-by: jolheiser <git@jolheiser.com>
 7---
 8 cli.go | 2 +-
 9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/cli.go b/cli.go
12index 93869c8..40d9a04 100644
13--- a/cli.go
14+++ b/cli.go
15@@ -810,7 +810,7 @@ Here's how it works:
16 								return nil
17 							}
18 
19-							if nextStatus != "" {
20+							if prq.Status != nextStatus {
21 								err = pr.UpdatePatchRequestStatus(prID, user.ID, nextStatus)
22 								if err != nil {
23 									return err
24-- 
252.45.1
26
ps-18 by jolheiser on 2024-07-22T16:35:13Z
Diff ↕

REVIEW lgtm

Eric Bower <me@erock.io>
woops! thanks for fixing that

jolheiser (1):
  fix: only log status change if the status changes

 cli.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

base-commit: dbedbf6c422822dfdaaded07103829f8bb85d11a
--
2.45.2
 1From 31fcd4a1f446368c4f1db8427282ee0222962f1f Mon Sep 17 00:00:00 2001
 2From: Eric Bower <me@erock.io>
 3Date: Mon, 22 Jul 2024 14:12:25 -0400
 4Subject: [PATCH 0/1] lgtm
 5
 6woops! thanks for fixing that
 7
 8jolheiser (1):
 9  fix: only log status change if the status changes
10
11 cli.go | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14
15base-commit: dbedbf6c422822dfdaaded07103829f8bb85d11a
16-- 
172.45.2
ps-22 by erock on 2024-07-22T18:12:49Z

REVIEW lgtm

Eric Bower <me@erock.io> 2024-07-22T18:12:25Z
woops! thanks for fixing that

jolheiser (1):
  fix: only log status change if the status changes

 cli.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

base-commit: dbedbf6c422822dfdaaded07103829f8bb85d11a
--
2.45.2
 1From 31fcd4a1f446368c4f1db8427282ee0222962f1f Mon Sep 17 00:00:00 2001
 2From: Eric Bower <me@erock.io>
 3Date: Mon, 22 Jul 2024 14:12:25 -0400
 4Subject: [PATCH 0/1] lgtm
 5
 6woops! thanks for fixing that
 7
 8jolheiser (1):
 9  fix: only log status change if the status changes
10
11 cli.go | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14
15base-commit: dbedbf6c422822dfdaaded07103829f8bb85d11a
16-- 
172.45.2

fix: only log status change if the status changes

jolheiser <git@jolheiser.com> 2024-07-22T16:34:57Z
Signed-off-by: jolheiser <git@jolheiser.com>
 cli.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 1From 31fcd4a1f446368c4f1db8427282ee0222962f1f Mon Sep 17 00:00:00 2001
 2From: jolheiser <git@jolheiser.com>
 3Date: Mon, 22 Jul 2024 11:34:57 -0500
 4Subject: [PATCH 1/1] fix: only log status change if the status changes
 5
 6Signed-off-by: jolheiser <git@jolheiser.com>
 7---
 8 cli.go | 2 +-
 9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/cli.go b/cli.go
12index 93869c8..40d9a04 100644
13--- a/cli.go
14+++ b/cli.go
15@@ -810,7 +810,7 @@ Here's how it works:
16 								return nil
17 							}
18 
19-							if nextStatus != "" {
20+							if prq.Status != nextStatus {
21 								err = pr.UpdatePatchRequestStatus(prID, user.ID, nextStatus)
22 								if err != nil {
23 									return err
24-- 
252.45.2
26