Remove Participants related codes for pr view`

This commit is contained in:
Toshiya Doi 2020-04-10 01:01:41 +09:00
parent 531bfbc295
commit 6d0e5bf2b8
5 changed files with 0 additions and 79 deletions

View file

@ -107,12 +107,6 @@ type PullRequest struct {
Milestone struct {
Title string
}
Participants struct {
Nodes []struct {
Login string
}
TotalCount int
}
}
type NotFoundError struct {
@ -423,12 +417,6 @@ func PullRequestByNumber(client *Client, repo ghrepo.Interface, number int) (*Pu
milestone{
title
}
participants(first: 100) {
nodes {
login
}
totalCount
}
}
}
}`
@ -528,12 +516,6 @@ func PullRequestForBranch(client *Client, repo ghrepo.Interface, baseBranch, hea
milestone{
title
}
participants(first: 100) {
nodes {
login
}
totalCount
}
}
}
}

View file

@ -425,23 +425,6 @@ func prProjectList(pr api.PullRequest) string {
return list
}
func prParticipantList(pr api.PullRequest) string {
if len(pr.Participants.Nodes) == 0 {
return ""
}
participantNames := make([]string, 0, len(pr.Participants.Nodes))
for _, participant := range pr.Participants.Nodes {
participantNames = append(participantNames, participant.Login)
}
list := strings.Join(participantNames, ", ")
if pr.Participants.TotalCount > len(pr.Participants.Nodes) {
list += ", …"
}
return list
}
var prURLRE = regexp.MustCompile(`^https://github\.com/([^/]+)/([^/]+)/pull/(\d+)`)
func prFromURL(arg string) (string, ghrepo.Interface) {

View file

@ -25,14 +25,6 @@
"milestone": {
"title": ""
},
"participants": {
"nodes": [
{
"login": "marseilles"
}
],
"totalcount": 1
},
"commits": {
"totalCount": 12
},

View file

@ -27,14 +27,6 @@
"totalcount": 0
},
"milestone": {},
"participants": {
"nodes": [
{
"login": "nobody"
}
],
"totalcount": 1
},
"commits": {
"totalCount": 12
},
@ -118,20 +110,6 @@
"milestone": {
"title": "uluru"
},
"participants": {
"nodes": [
{
"login": "marseilles"
},
{
"login": "monaco"
},
{
"login": "montpellier"
}
],
"totalcount": 3
},
"headRepositoryOwner": {
"login": "OWNER"
},

View file

@ -73,20 +73,6 @@
"milestone": {
"title": "uluru"
},
"participants": {
"nodes": [
{
"login": "marseilles"
},
{
"login": "monaco"
},
{
"login": "montpellier"
}
],
"totalcount": 3
},
"commits": {
"totalCount": 12
},