Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove comment #33

Merged
merged 1 commit into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extension Github {
static let operationName: String = "SearchPullRequests"
static let operationDocument: ApolloAPI.OperationDocument = .init(
definition: .init(
#"query SearchPullRequests($query: String!) { search(type: ISSUE, last: 100, query: $query) { __typename nodes { __typename ... on PullRequest { repository { __typename name owner { __typename login } } title url reviewDecision mergeable isDraft updatedAt comments(last: 1) { __typename nodes { __typename author { __typename login } bodyText } } commits(last: 1) { __typename nodes { __typename commit { __typename url statusCheckRollup { __typename state } } } } reviews(states: APPROVED) { __typename totalCount } } } } }"#
#"query SearchPullRequests($query: String!) { search(type: ISSUE, last: 100, query: $query) { __typename nodes { __typename ... on PullRequest { repository { __typename name owner { __typename login } } title url reviewDecision mergeable isDraft updatedAt comments(last: 1) { __typename nodes { __typename author { __typename login } } } commits(last: 1) { __typename nodes { __typename commit { __typename url statusCheckRollup { __typename state } } } } reviews(states: APPROVED) { __typename totalCount } } } } }"#
))

public var query: String
Expand Down Expand Up @@ -173,13 +173,10 @@ extension Github {
static var __selections: [ApolloAPI.Selection] { [
.field("__typename", String.self),
.field("author", Author?.self),
.field("bodyText", String.self),
] }

/// The actor who authored the comment.
var author: Author? { __data["author"] }
/// The body rendered to text.
var bodyText: String { __data["bodyText"] }

/// Search.Node.AsPullRequest.Comments.Node.Author
///
Expand Down
1 change: 0 additions & 1 deletion Pulse/Github/SearchPullRequests.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ query SearchPullRequests($query: String!) {
author {
login
}
bodyText
}
}
commits(last: 1) {
Expand Down
2 changes: 0 additions & 2 deletions Pulse/PullRequestAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ struct PullRequest: Identifiable {
let url: String
let mergeable: Github.MergeableState // NOTE: It might use
let commitUrl: String
let comment: String?
let commentAuthor: String?
let draft: Bool
let approvedCount: Int
Expand Down Expand Up @@ -114,7 +113,6 @@ struct PullRequestAPI {
url: asPull.url,
mergeable: asPull.mergeable.value ?? Github.MergeableState.unknown,
commitUrl: commit.url,
comment: asPull.comments.nodes?.first??.bodyText,
commentAuthor: asPull.comments.nodes?.first??.author?.login,
draft: asPull.isDraft,
approvedCount: asPull.reviews?.totalCount ?? 0,
Expand Down
Loading