-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgithub.go
68 lines (56 loc) · 1.81 KB
/
github.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package main
import (
"time"
)
// SimpleEvent represents a simple version of the gitHub Event
type SimpleEvent struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
EventAt time.Time `json:"event_time,omitempty"`
Repo string `json:"repo,omitempty"`
Actor string `json:"actor,omitempty"`
Countable bool `json:"countable,omitempty"`
}
// SimplePushEvent is simple version of the GitHub structure
type SimplePushEvent struct {
User SimpleUser `json:"sender"`
Repo SimpleRepo `json:"repository"`
}
// ReviewEvent is simple version of the GitHub structure
type ReviewEvent struct {
Review ReviewActivity `json:"review"`
Repo SimpleRepo `json:"repository"`
}
// PullRequestEvent is simple version of the GitHub structure
type PullRequestEvent struct {
PR SimpleUserActivity `json:"pull_request"`
Repo SimpleRepo `json:"repository"`
}
// IssuesEvent is simple version of the GitHub structure
type IssuesEvent struct {
Issue SimpleUserActivity `json:"issue"`
Repo SimpleRepo `json:"repository"`
}
// CommentEvent is simple version of the GitHub structure
type CommentEvent struct {
Comment SimpleUserActivity `json:"comment"`
Repo SimpleRepo `json:"repository"`
}
// SimpleUserActivity is simple version of the GitHub structure
type SimpleUserActivity struct {
User SimpleUser `json:"user"`
CreatedAt time.Time `json:"updated_at"`
}
// ReviewActivity is simple version of the GitHub structure
type ReviewActivity struct {
User SimpleUser `json:"user"`
CreatedAt time.Time `json:"submitted_at"`
}
// SimpleRepo is simple version of the GitHub structure
type SimpleRepo struct {
Name string `json:"full_name"`
}
// SimpleUser is simple version of the GitHub structure
type SimpleUser struct {
Name string `json:"login"`
}