Skip to content

Commit 6d0e5bf

Browse files
committed
Remove Participants related codes for pr view`
1 parent 531bfbc commit 6d0e5bf

File tree

5 files changed

+0
-79
lines changed

5 files changed

+0
-79
lines changed

api/queries_pr.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,6 @@ type PullRequest struct {
107107
Milestone struct {
108108
Title string
109109
}
110-
Participants struct {
111-
Nodes []struct {
112-
Login string
113-
}
114-
TotalCount int
115-
}
116110
}
117111

118112
type NotFoundError struct {
@@ -423,12 +417,6 @@ func PullRequestByNumber(client *Client, repo ghrepo.Interface, number int) (*Pu
423417
milestone{
424418
title
425419
}
426-
participants(first: 100) {
427-
nodes {
428-
login
429-
}
430-
totalCount
431-
}
432420
}
433421
}
434422
}`
@@ -528,12 +516,6 @@ func PullRequestForBranch(client *Client, repo ghrepo.Interface, baseBranch, hea
528516
milestone{
529517
title
530518
}
531-
participants(first: 100) {
532-
nodes {
533-
login
534-
}
535-
totalCount
536-
}
537519
}
538520
}
539521
}

command/pr.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -425,23 +425,6 @@ func prProjectList(pr api.PullRequest) string {
425425
return list
426426
}
427427

428-
func prParticipantList(pr api.PullRequest) string {
429-
if len(pr.Participants.Nodes) == 0 {
430-
return ""
431-
}
432-
433-
participantNames := make([]string, 0, len(pr.Participants.Nodes))
434-
for _, participant := range pr.Participants.Nodes {
435-
participantNames = append(participantNames, participant.Login)
436-
}
437-
438-
list := strings.Join(participantNames, ", ")
439-
if pr.Participants.TotalCount > len(pr.Participants.Nodes) {
440-
list += ", …"
441-
}
442-
return list
443-
}
444-
445428
var prURLRE = regexp.MustCompile(`^https://github\.com/([^/]+)/([^/]+)/pull/(\d+)`)
446429

447430
func prFromURL(arg string) (string, ghrepo.Interface) {

test/fixtures/prViewPreview.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@
2525
"milestone": {
2626
"title": ""
2727
},
28-
"participants": {
29-
"nodes": [
30-
{
31-
"login": "marseilles"
32-
}
33-
],
34-
"totalcount": 1
35-
},
3628
"commits": {
3729
"totalCount": 12
3830
},

test/fixtures/prViewPreviewWithMetadataByBranch.json

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@
2727
"totalcount": 0
2828
},
2929
"milestone": {},
30-
"participants": {
31-
"nodes": [
32-
{
33-
"login": "nobody"
34-
}
35-
],
36-
"totalcount": 1
37-
},
3830
"commits": {
3931
"totalCount": 12
4032
},
@@ -118,20 +110,6 @@
118110
"milestone": {
119111
"title": "uluru"
120112
},
121-
"participants": {
122-
"nodes": [
123-
{
124-
"login": "marseilles"
125-
},
126-
{
127-
"login": "monaco"
128-
},
129-
{
130-
"login": "montpellier"
131-
}
132-
],
133-
"totalcount": 3
134-
},
135113
"headRepositoryOwner": {
136114
"login": "OWNER"
137115
},

test/fixtures/prViewPreviewWithMetadataByNumber.json

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,6 @@
7373
"milestone": {
7474
"title": "uluru"
7575
},
76-
"participants": {
77-
"nodes": [
78-
{
79-
"login": "marseilles"
80-
},
81-
{
82-
"login": "monaco"
83-
},
84-
{
85-
"login": "montpellier"
86-
}
87-
],
88-
"totalcount": 3
89-
},
9076
"commits": {
9177
"totalCount": 12
9278
},

0 commit comments

Comments
 (0)