@@ -2,6 +2,7 @@ package api
22
33import (
44 "fmt"
5+ "time"
56)
67
78type IssuesPayload struct {
@@ -16,12 +17,13 @@ type IssuesAndTotalCount struct {
1617}
1718
1819type Issue struct {
19- Number int
20- Title string
21- URL string
22- State string
23- Body string
24- Comments struct {
20+ Number int
21+ Title string
22+ URL string
23+ State string
24+ Body string
25+ UpdatedAt time.Time
26+ Comments struct {
2527 TotalCount int
2628 }
2729 Author struct {
@@ -44,6 +46,7 @@ const fragments = `
4446 title
4547 url
4648 state
49+ updatedAt
4750 labels(first: 3) {
4851 nodes {
4952 name
@@ -111,19 +114,19 @@ func IssueStatus(client *Client, ghRepo Repo, currentUsername string) (*IssuesPa
111114 query($owner: String!, $repo: String!, $viewer: String!, $per_page: Int = 10) {
112115 repository(owner: $owner, name: $repo) {
113116 hasIssuesEnabled
114- assigned: issues(filterBy: {assignee: $viewer, states: OPEN}, first: $per_page, orderBy: {field: CREATED_AT , direction: DESC}) {
117+ assigned: issues(filterBy: {assignee: $viewer, states: OPEN}, first: $per_page, orderBy: {field: UPDATED_AT , direction: DESC}) {
115118 totalCount
116119 nodes {
117120 ...issue
118121 }
119122 }
120- mentioned: issues(filterBy: {mentioned: $viewer, states: OPEN}, first: $per_page, orderBy: {field: CREATED_AT , direction: DESC}) {
123+ mentioned: issues(filterBy: {mentioned: $viewer, states: OPEN}, first: $per_page, orderBy: {field: UPDATED_AT , direction: DESC}) {
121124 totalCount
122125 nodes {
123126 ...issue
124127 }
125128 }
126- authored: issues(filterBy: {createdBy: $viewer, states: OPEN}, first: $per_page, orderBy: {field: CREATED_AT , direction: DESC}) {
129+ authored: issues(filterBy: {createdBy: $viewer, states: OPEN}, first: $per_page, orderBy: {field: UPDATED_AT , direction: DESC}) {
127130 totalCount
128131 nodes {
129132 ...issue
0 commit comments