@@ -8,6 +8,7 @@ package github
8
8
import (
9
9
"context"
10
10
"fmt"
11
+ "strings"
11
12
"time"
12
13
)
13
14
@@ -68,13 +69,14 @@ type IssueEvent struct {
68
69
Issue * Issue `json:"issue,omitempty"`
69
70
70
71
// Only present on certain events; see above.
71
- Assignee * User `json:"assignee,omitempty"`
72
- Assigner * User `json:"assigner,omitempty"`
73
- CommitID * string `json:"commit_id,omitempty"`
74
- Milestone * Milestone `json:"milestone,omitempty"`
75
- Label * Label `json:"label,omitempty"`
76
- Rename * Rename `json:"rename,omitempty"`
77
- LockReason * string `json:"lock_reason,omitempty"`
72
+ Assignee * User `json:"assignee,omitempty"`
73
+ Assigner * User `json:"assigner,omitempty"`
74
+ CommitID * string `json:"commit_id,omitempty"`
75
+ Milestone * Milestone `json:"milestone,omitempty"`
76
+ Label * Label `json:"label,omitempty"`
77
+ Rename * Rename `json:"rename,omitempty"`
78
+ LockReason * string `json:"lock_reason,omitempty"`
79
+ ProjectCard * ProjectCard `json:"project_card,omitempty"`
78
80
}
79
81
80
82
// ListIssueEvents lists events for the specified issue.
@@ -92,7 +94,8 @@ func (s *IssuesService) ListIssueEvents(ctx context.Context, owner, repo string,
92
94
return nil , nil , err
93
95
}
94
96
95
- req .Header .Set ("Accept" , mediaTypeLockReasonPreview )
97
+ acceptHeaders := []string {mediaTypeLockReasonPreview , mediaTypeProjectCardDetailsPreview }
98
+ req .Header .Set ("Accept" , strings .Join (acceptHeaders , ", " ))
96
99
97
100
var events []* IssueEvent
98
101
resp , err := s .client .Do (ctx , req , & events )
0 commit comments