-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgithub.go
41 lines (36 loc) · 998 Bytes
/
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
package bay
import (
"time"
)
type webhook struct {
Ref string `json:"ref"`
Before string `json:"before"`
After string `json:"after"`
Created bool `json:"created"`
Deleted bool `json:"deleted"`
Forced bool `json:"forced"`
Commits []commit `json:"commits"`
Repository repository `json:"repository"`
}
type commit struct {
Id string `json:"id"`
Distinct bool `json:"distinct"`
Message string `json:"message"`
Timestamp time.Time `json:"timestamp"`
URL string `json:"url"`
Auther User `json:"author"`
Committer User `json:"committer"`
}
type repository struct {
Id int `json:"id"`
Name string `json:"name"`
FullName string `json:"full_name"`
Owner User `json:"owner"`
HtmlURL string `json:"html_url"`
URL string `json:"url"`
}
type User struct {
Name string `json:"name"`
Email string `json:"email"`
Username string `json:"username"`
}