diff --git a/Classes/Repository/RepositorySummarySectionController.swift b/Classes/Repository/RepositorySummarySectionController.swift index 3f64a302..1ff63d4c 100644 --- a/Classes/Repository/RepositorySummarySectionController.swift +++ b/Classes/Repository/RepositorySummarySectionController.swift @@ -36,8 +36,9 @@ final class RepositorySummarySectionController: ListGenericSectionController CFBundleVersion - 1562 + 1564 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/gql/API.swift b/gql/API.swift index 69a34886..bb3d4e4f 100644 --- a/gql/API.swift +++ b/gql/API.swift @@ -2776,7 +2776,6 @@ public final class RemoveReactionMutation: GraphQLMutation { } } - public final class RepoIssuesQuery: GraphQLQuery { public static let operationDefinition = "query RepoIssues($owner: String!, $name: String!, $after: String) {" + @@ -2927,26 +2926,12 @@ public final class RepoPullRequestsQuery: GraphQLQuery { " __typename" + " hasNextPage" + " endCursor" + - -public final class RepositoryLabelsQuery: GraphQLQuery { - public static let operationDefinition = - "query RepositoryLabels($owner: String!, $repo: String!) {" + - " repository(owner: $owner, name: $repo) {" + - " __typename" + - " labels(first: 100) {" + - " __typename" + - " nodes {" + - " __typename" + - " name" + - " color" + - " }" + " }" + " }" + "}" public let owner: String - public let name: String public let after: String? @@ -2958,17 +2943,6 @@ public final class RepositoryLabelsQuery: GraphQLQuery { public var variables: GraphQLMap? { return ["owner": owner, "name": name, "after": after] - - public let repo: String - - public init(owner: String, repo: String) { - self.owner = owner - self.repo = repo - } - - public var variables: GraphQLMap? { - return ["owner": owner, "repo": repo] - } public struct Data: GraphQLMappable { @@ -2976,15 +2950,11 @@ public final class RepositoryLabelsQuery: GraphQLQuery { public let repository: Repository? public init(reader: GraphQLResultReader) throws { - repository = try reader.optionalValue(for: Field(responseName: "repository", arguments: ["owner": reader.variables["owner"], "name": reader.variables["name"]])) - - repository = try reader.optionalValue(for: Field(responseName: "repository", arguments: ["owner": reader.variables["owner"], "name": reader.variables["repo"]])) } public struct Repository: GraphQLMappable { public let __typename: String - /// A list of pull requests that have been opened in the repository. public let pullRequests: PullRequest @@ -3000,31 +2970,14 @@ public final class RepositoryLabelsQuery: GraphQLQuery { /// Information to aid in pagination. public let pageInfo: PageInfo - /// A list of labels associated with the repository. - public let labels: Label? - - public init(reader: GraphQLResultReader) throws { - __typename = try reader.value(for: Field(responseName: "__typename")) - labels = try reader.optionalValue(for: Field(responseName: "labels", arguments: ["first": 100])) - } - - public struct Label: GraphQLMappable { - public let __typename: String - /// A list of nodes. - public let nodes: [Node?]? - - public init(reader: GraphQLResultReader) throws { __typename = try reader.value(for: Field(responseName: "__typename")) nodes = try reader.optionalList(for: Field(responseName: "nodes")) - pageInfo = try reader.value(for: Field(responseName: "pageInfo")) - } public struct Node: GraphQLMappable { public let __typename: String - public let id: GraphQLID /// Identifies the pull request title. public let title: String @@ -3077,6 +3030,80 @@ public final class RepositoryLabelsQuery: GraphQLQuery { } } +public final class RepositoryLabelsQuery: GraphQLQuery { + public static let operationDefinition = + "query RepositoryLabels($owner: String!, $repo: String!) {" + + " repository(owner: $owner, name: $repo) {" + + " __typename" + + " labels(first: 100) {" + + " __typename" + + " nodes {" + + " __typename" + + " name" + + " color" + + " }" + + " }" + + " }" + + "}" + + public let owner: String + public let repo: String + + public init(owner: String, repo: String) { + self.owner = owner + self.repo = repo + } + + public var variables: GraphQLMap? { + return ["owner": owner, "repo": repo] + } + + public struct Data: GraphQLMappable { + /// Lookup a given repository by the owner and repository name. + public let repository: Repository? + + public init(reader: GraphQLResultReader) throws { + repository = try reader.optionalValue(for: Field(responseName: "repository", arguments: ["owner": reader.variables["owner"], "name": reader.variables["repo"]])) + } + + public struct Repository: GraphQLMappable { + public let __typename: String + /// A list of labels associated with the repository. + public let labels: Label? + + public init(reader: GraphQLResultReader) throws { + __typename = try reader.value(for: Field(responseName: "__typename")) + labels = try reader.optionalValue(for: Field(responseName: "labels", arguments: ["first": 100])) + } + + public struct Label: GraphQLMappable { + public let __typename: String + /// A list of nodes. + public let nodes: [Node?]? + + public init(reader: GraphQLResultReader) throws { + __typename = try reader.value(for: Field(responseName: "__typename")) + nodes = try reader.optionalList(for: Field(responseName: "nodes")) + } + + public struct Node: GraphQLMappable { + public let __typename: String + /// Identifies the label name. + public let name: String + /// Identifies the label color. + public let color: String + + public init(reader: GraphQLResultReader) throws { + __typename = try reader.value(for: Field(responseName: "__typename")) + name = try reader.value(for: Field(responseName: "name")) + color = try reader.value(for: Field(responseName: "color")) + } + } + } + } + } +} + public final class SearchReposQuery: GraphQLQuery { public static let operationDefinition = "query SearchRepos($search: String!, $before: String) {" + @@ -3243,18 +3270,6 @@ public final class SearchReposQuery: GraphQLQuery { __typename = try reader.value(for: Field(responseName: "__typename")) endCursor = try reader.optionalValue(for: Field(responseName: "endCursor")) hasNextPage = try reader.value(for: Field(responseName: "hasNextPage")) - - /// Identifies the label name. - public let name: String - /// Identifies the label color. - public let color: String - - public init(reader: GraphQLResultReader) throws { - __typename = try reader.value(for: Field(responseName: "__typename")) - name = try reader.value(for: Field(responseName: "name")) - color = try reader.value(for: Field(responseName: "color")) - } - } } }