Skip to content

Commit a23b142

Browse files
committed
feat: pr sidebar tabs
1 parent f661d85 commit a23b142

File tree

9 files changed

+687
-88
lines changed

9 files changed

+687
-88
lines changed

data/prapi.go

+16-3
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ type PullRequestData struct {
4444
Assignees Assignees `graphql:"assignees(first: 3)"`
4545
Comments Comments `graphql:"comments(last: 5, orderBy: { field: UPDATED_AT, direction: DESC })"`
4646
Reviews Reviews `graphql:"reviews(last: 3)"`
47-
ReviewThreads ReviewThreads `graphql:"reviewThreads(last: 20)"`
48-
ReviewRequests ReviewRequests `graphql:"reviewRequests(last: 10)"`
47+
ReviewThreads ReviewThreads `graphql:"reviewThreads(last: 3)"`
48+
ReviewRequests ReviewRequests `graphql:"reviewRequests(last: 5)"`
49+
Files ChangedFiles `graphql:"files(first: 5)"`
4950
IsDraft bool
5051
Commits Commits `graphql:"commits(last: 1)"`
51-
Labels PRLabels `graphql:"labels(first: 3)"`
52+
Labels PRLabels `graphql:"labels(first: 6)"`
5253
MergeStateStatus MergeStateStatus `graphql:"mergeStateStatus"`
5354
}
5455

@@ -153,6 +154,18 @@ type ReviewThreads struct {
153154
}
154155
}
155156

157+
type ChangedFile struct {
158+
Additions int
159+
Deletions int
160+
Path string
161+
ChangeType string
162+
}
163+
164+
type ChangedFiles struct {
165+
TotalCount int
166+
Nodes []ChangedFile
167+
}
168+
156169
type ReviewRequests struct {
157170
TotalCount int
158171
Nodes []struct {

imposters/pr.json

+52-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,34 @@
3535
},
3636
"comments": {
3737
"nodes": [
38+
{
39+
"author": {
40+
"login": "zeertzjq"
41+
},
42+
"body": "The addition of empty strings in `values` may lead to undesired behavior in cmdline completion:\r\n![Screenshot](https://github.com/user-attachments/assets/b770904b-5544-49a0-b815-31b51371d07c)\r\n\r\nNot selecting any entry already leads to a empty string, so there is now an redundant empty menu entry.",
43+
"updatedAt": "2025-01-10T10:50:53Z"
44+
},
45+
{
46+
"author": {
47+
"login": "zeertzjq"
48+
},
49+
"body": "The addition of empty strings in `values` may lead to undesired behavior in cmdline completion:\r\n![Screenshot](https://github.com/user-attachments/assets/b770904b-5544-49a0-b815-31b51371d07c)\r\n\r\nNot selecting any entry already leads to a empty string, so there is now an redundant empty menu entry.",
50+
"updatedAt": "2025-01-10T10:50:53Z"
51+
},
52+
{
53+
"author": {
54+
"login": "zeertzjq"
55+
},
56+
"body": "The addition of empty strings in `values` may lead to undesired behavior in cmdline completion:\r\n![Screenshot](https://github.com/user-attachments/assets/b770904b-5544-49a0-b815-31b51371d07c)\r\n\r\nNot selecting any entry already leads to a empty string, so there is now an redundant empty menu entry.",
57+
"updatedAt": "2025-01-10T10:50:53Z"
58+
},
59+
{
60+
"author": {
61+
"login": "zeertzjq"
62+
},
63+
"body": "The addition of empty strings in `values` may lead to undesired behavior in cmdline completion:\r\n![Screenshot](https://github.com/user-attachments/assets/b770904b-5544-49a0-b815-31b51371d07c)\r\n\r\nNot selecting any entry already leads to a empty string, so there is now an redundant empty menu entry.",
64+
"updatedAt": "2025-01-10T10:50:53Z"
65+
},
3866
{
3967
"author": {
4068
"login": "zeertzjq"
@@ -43,7 +71,7 @@
4371
"updatedAt": "2025-01-10T10:50:53Z"
4472
}
4573
],
46-
"totalCount": 1
74+
"totalCount": 5
4775
},
4876
"reviews": {
4977
"totalCount": 2,
@@ -226,6 +254,29 @@
226254
}
227255
]
228256
},
257+
"files": {
258+
"totalCount": 3,
259+
"nodes": [
260+
{
261+
"additions": 1,
262+
"deletions": 0,
263+
"path": "Makefile",
264+
"changeType": "MODIFIED"
265+
},
266+
{
267+
"additions": 115,
268+
"deletions": 1,
269+
"path": "flake.lock",
270+
"changeType": "MODIFIED"
271+
},
272+
{
273+
"additions": 27,
274+
"deletions": 2,
275+
"path": "flake.nix",
276+
"changeType": "MODIFIED"
277+
}
278+
]
279+
},
229280
"labels": {
230281
"nodes": [
231282
{

0 commit comments

Comments
 (0)