repos / git-pr

a self-hosted git collaboration server
git clone https://github.com/picosh/git-pr.git

commit
f891a2f
parent
812fb51
author
Eric Bower
date
2025-08-22 10:20:08 -0400 EDT
chore: add comment e2e test
3 files changed,  +13, -6
M Makefile
+0, -1
1@@ -5,7 +5,6 @@ DOCKER_BUILDX_BUILD?=$(DOCKER_CMD) buildx build --push --platform $(DOCKER_PLATF
2 
3 fmt:
4 	go fmt ./...
5-	deno fmt README.md
6 .PHONY: fmt
7 
8 lint:
M __snapshots__/e2e_test.snap
+7, -4
 1@@ -10,16 +10,16 @@ ID RepoID Name                    Status Patchsets User        Date
 2 PR submitted! Use the ID for interacting with this PR.
 3 Info
 4 ====
 5-URL: https://localhost/prs/9
 6+URL: https://localhost/prs/10
 7 Repo: contributor/bin
 8 
 9 ID Name                    Status Date
10-9  feat: lets build an rnn [open] 
11+10 feat: lets build an rnn [open] 
12 
13 Patchsets
14 ====
15 ID    Type User        Date
16-ps-13      contributor 
17+ps-14      contributor 
18 
19 Patches from latest patchset
20 ====
21@@ -30,7 +30,8 @@ Idx Title                   Commit  Author                   Date
22 
23 [TestE2E - 3]
24 ID RepoID           Name                       Status     Patchsets User        Date
25-9  contributor/bin  feat: lets build an rnn    [open]     1         contributor 
26+10 contributor/bin  feat: lets build an rnn    [open]     1         contributor 
27+9  admin/ai         feat: lets build an rnn    [accepted] 1         contributor 
28 8  admin/ai         feat: lets build an rnn    [accepted] 2         contributor 
29 7  contributor/ai   feat: lets build an rnn    [accepted] 1         admin       
30 6  contributor/test Closed patch with review   [closed]   2         contributor 
31@@ -47,5 +48,7 @@ RepoID   PrID PatchsetID Event             Created Data
32 admin/ai 8    ps-11      pr_created                
33 admin/ai 8    ps-12      pr_patchset_added         
34 admin/ai 8               pr_status_changed         {"status":"accepted"}
35+admin/ai 9    ps-13      pr_created                
36+admin/ai 9               pr_status_changed         {"status":"accepted","comment":"nice work"}
37 
38 ---
M e2e_test.go
+6, -1
 1@@ -105,11 +105,16 @@ func testMultiTenantE2E(t *testing.T) {
 2 	suite.adminKey.MustCmd(suite.patch, "pr create contributor/ai")
 3 	suite.userKey.MustCmd(suite.otherPatch, "pr accept 7")
 4 
 5-	t.Log("Create pr with user repo and admin can accept")
 6+	t.Log("Create pr with admin repo and admin can accept")
 7 	suite.adminKey.MustCmd(nil, "repo create ai")
 8 	suite.userKey.MustCmd(suite.patch, "pr create admin/ai")
 9 	suite.adminKey.MustCmd(suite.otherPatch, "pr add --accept 8")
10 
11+	t.Log("Create pr with admin repo and user can accept with comment")
12+	suite.adminKey.MustCmd(nil, "repo create ai")
13+	suite.userKey.MustCmd(suite.patch, "pr create admin/ai")
14+	suite.adminKey.MustCmd(suite.otherPatch, "pr accept --comment 'nice work' 9")
15+
16 	t.Log("Create pr with default `bin` repo")
17 	actual, err := suite.userKey.Cmd(suite.patch, "pr create")
18 	bail(err)