mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-06-02 19:44:08 +08:00
sort repo issues/pr by created desc so easier to find
This commit is contained in:
@@ -2781,7 +2781,7 @@ public final class RepoDetailsQuery: GraphQLQuery {
|
||||
"query RepoDetails($owner: String!, $name: String!, $page_size: Int!) {" +
|
||||
" repository(owner: $owner, name: $name) {" +
|
||||
" __typename" +
|
||||
" issues(first: $page_size, orderBy: {field: UPDATED_AT, direction: DESC}, states: [OPEN, CLOSED]) {" +
|
||||
" issues(first: $page_size, orderBy: {field: CREATED_AT, direction: DESC}, states: [OPEN, CLOSED]) {" +
|
||||
" __typename" +
|
||||
" nodes {" +
|
||||
" __typename" +
|
||||
@@ -2797,7 +2797,7 @@ public final class RepoDetailsQuery: GraphQLQuery {
|
||||
" endCursor" +
|
||||
" }" +
|
||||
" }" +
|
||||
" pullRequests(first: $page_size, orderBy: {field: UPDATED_AT, direction: DESC}, states: [OPEN, CLOSED, MERGED]) {" +
|
||||
" pullRequests(first: $page_size, orderBy: {field: CREATED_AT, direction: DESC}, states: [OPEN, CLOSED, MERGED]) {" +
|
||||
" __typename" +
|
||||
" nodes {" +
|
||||
" __typename" +
|
||||
@@ -2848,8 +2848,8 @@ public final class RepoDetailsQuery: GraphQLQuery {
|
||||
|
||||
public init(reader: GraphQLResultReader) throws {
|
||||
__typename = try reader.value(for: Field(responseName: "__typename"))
|
||||
issues = try reader.value(for: Field(responseName: "issues", arguments: ["first": reader.variables["page_size"], "orderBy": ["field": "UPDATED_AT", "direction": "DESC"], "states": ["OPEN", "CLOSED"]]))
|
||||
pullRequests = try reader.value(for: Field(responseName: "pullRequests", arguments: ["first": reader.variables["page_size"], "orderBy": ["field": "UPDATED_AT", "direction": "DESC"], "states": ["OPEN", "CLOSED", "MERGED"]]))
|
||||
issues = try reader.value(for: Field(responseName: "issues", arguments: ["first": reader.variables["page_size"], "orderBy": ["field": "CREATED_AT", "direction": "DESC"], "states": ["OPEN", "CLOSED"]]))
|
||||
pullRequests = try reader.value(for: Field(responseName: "pullRequests", arguments: ["first": reader.variables["page_size"], "orderBy": ["field": "CREATED_AT", "direction": "DESC"], "states": ["OPEN", "CLOSED", "MERGED"]]))
|
||||
}
|
||||
|
||||
public struct Issue: GraphQLMappable {
|
||||
@@ -2972,7 +2972,7 @@ public final class RepoIssuePagesQuery: GraphQLQuery {
|
||||
"query RepoIssuePages($owner: String!, $name: String!, $after: String, $page_size: Int!) {" +
|
||||
" repository(owner: $owner, name: $name) {" +
|
||||
" __typename" +
|
||||
" issues(first: $page_size, orderBy: {field: UPDATED_AT, direction: DESC}, states: [OPEN, CLOSED], after: $after) {" +
|
||||
" issues(first: $page_size, orderBy: {field: CREATED_AT, direction: DESC}, states: [OPEN, CLOSED], after: $after) {" +
|
||||
" __typename" +
|
||||
" nodes {" +
|
||||
" __typename" +
|
||||
@@ -3023,7 +3023,7 @@ public final class RepoIssuePagesQuery: GraphQLQuery {
|
||||
|
||||
public init(reader: GraphQLResultReader) throws {
|
||||
__typename = try reader.value(for: Field(responseName: "__typename"))
|
||||
issues = try reader.value(for: Field(responseName: "issues", arguments: ["first": reader.variables["page_size"], "orderBy": ["field": "UPDATED_AT", "direction": "DESC"], "states": ["OPEN", "CLOSED"], "after": reader.variables["after"]]))
|
||||
issues = try reader.value(for: Field(responseName: "issues", arguments: ["first": reader.variables["page_size"], "orderBy": ["field": "CREATED_AT", "direction": "DESC"], "states": ["OPEN", "CLOSED"], "after": reader.variables["after"]]))
|
||||
}
|
||||
|
||||
public struct Issue: GraphQLMappable {
|
||||
@@ -3090,7 +3090,7 @@ public final class RepoPullRequestPagesQuery: GraphQLQuery {
|
||||
"query RepoPullRequestPages($owner: String!, $name: String!, $after: String, $page_size: Int!) {" +
|
||||
" repository(owner: $owner, name: $name) {" +
|
||||
" __typename" +
|
||||
" pullRequests(first: $page_size, orderBy: {field: UPDATED_AT, direction: DESC}, states: [OPEN, CLOSED, MERGED], after: $after) {" +
|
||||
" pullRequests(first: $page_size, orderBy: {field: CREATED_AT, direction: DESC}, states: [OPEN, CLOSED, MERGED], after: $after) {" +
|
||||
" __typename" +
|
||||
" nodes {" +
|
||||
" __typename" +
|
||||
@@ -3141,7 +3141,7 @@ public final class RepoPullRequestPagesQuery: GraphQLQuery {
|
||||
|
||||
public init(reader: GraphQLResultReader) throws {
|
||||
__typename = try reader.value(for: Field(responseName: "__typename"))
|
||||
pullRequests = try reader.value(for: Field(responseName: "pullRequests", arguments: ["first": reader.variables["page_size"], "orderBy": ["field": "UPDATED_AT", "direction": "DESC"], "states": ["OPEN", "CLOSED", "MERGED"], "after": reader.variables["after"]]))
|
||||
pullRequests = try reader.value(for: Field(responseName: "pullRequests", arguments: ["first": reader.variables["page_size"], "orderBy": ["field": "CREATED_AT", "direction": "DESC"], "states": ["OPEN", "CLOSED", "MERGED"], "after": reader.variables["after"]]))
|
||||
}
|
||||
|
||||
public struct PullRequest: GraphQLMappable {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
query RepoDetails($owner: String!, $name: String!, $page_size: Int!) {
|
||||
repository(owner: $owner, name: $name) {
|
||||
issues(first: $page_size, orderBy: {field: UPDATED_AT, direction: DESC}, states: [OPEN, CLOSED]) {
|
||||
issues(first: $page_size, orderBy: {field: CREATED_AT, direction: DESC}, states: [OPEN, CLOSED]) {
|
||||
nodes {
|
||||
...repoEventFields
|
||||
...nodeFields
|
||||
@@ -13,7 +13,7 @@ query RepoDetails($owner: String!, $name: String!, $page_size: Int!) {
|
||||
endCursor
|
||||
}
|
||||
}
|
||||
pullRequests(first: $page_size, orderBy: {field: UPDATED_AT, direction: DESC}, states: [OPEN, CLOSED, MERGED]) {
|
||||
pullRequests(first: $page_size, orderBy: {field: CREATED_AT, direction: DESC}, states: [OPEN, CLOSED, MERGED]) {
|
||||
nodes {
|
||||
...repoEventFields
|
||||
...nodeFields
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
query RepoIssuePages($owner: String!, $name: String!, $after: String, $page_size: Int!) {
|
||||
repository(owner: $owner, name: $name) {
|
||||
issues(first: $page_size, orderBy: {field: UPDATED_AT, direction: DESC}, states: [OPEN, CLOSED], after: $after) {
|
||||
issues(first: $page_size, orderBy: {field: CREATED_AT, direction: DESC}, states: [OPEN, CLOSED], after: $after) {
|
||||
nodes {
|
||||
...repoEventFields
|
||||
...nodeFields
|
||||
@@ -18,7 +18,7 @@ query RepoIssuePages($owner: String!, $name: String!, $after: String, $page_size
|
||||
|
||||
query RepoPullRequestPages($owner: String!, $name: String!, $after: String, $page_size: Int!) {
|
||||
repository(owner: $owner, name: $name) {
|
||||
pullRequests(first: $page_size, orderBy: {field: UPDATED_AT, direction: DESC}, states: [OPEN, CLOSED, MERGED], after: $after) {
|
||||
pullRequests(first: $page_size, orderBy: {field: CREATED_AT, direction: DESC}, states: [OPEN, CLOSED, MERGED], after: $after) {
|
||||
nodes {
|
||||
...repoEventFields
|
||||
...nodeFields
|
||||
|
||||
Reference in New Issue
Block a user