-
Notifications
You must be signed in to change notification settings - Fork 0
/
issue.go
29 lines (26 loc) · 872 Bytes
/
issue.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package gitbot
import (
"fmt"
)
// Issue object from github api
type Issue struct {
User *User `json:"user"`
Assignee *User `json:"assignee"`
Milestone *Milestone `json:"milestone"`
PullRequest *PullRequest `json:"pull_request"`
ClosedBy *User `json:"closed_by"`
Labels []*Label `json:"labels"`
URL string `json:"url"`
HTMLURL string `json:"html_url"`
Number int `json:"number"`
State string `json:"state"`
Title string `json:"title"`
Body string `json:"body"`
Comments int `json:"comments"`
ClosedAt string `json:"closed_at"`
//CreatedAt NullTime `json:"created_at"`
//UpdatedAt NullTime `json:"updated_at"`
}
func (s Issue) String() string {
return fmt.Sprintf("#%v (%s)", s.Number, s.Title)
}