Define an order clause to sort PRs newest first

This commit is contained in:
Toshiya Doi 2020-02-25 01:27:19 +09:00
parent 28460e4b7e
commit 9c44eaeb6e

View file

@ -186,7 +186,7 @@ func PullRequests(client *Client, repo ghrepo.Interface, currentPRNumber int, cu
queryPrefix := `
query($owner: String!, $repo: String!, $headRefName: String!, $viewerQuery: String!, $reviewerQuery: String!, $per_page: Int = 10) {
repository(owner: $owner, name: $repo) {
pullRequests(headRefName: $headRefName, first: $per_page) {
pullRequests(headRefName: $headRefName, first: $per_page, orderBy: { field: CREATED_AT, direction: DESC }) {
totalCount
edges {
node {