-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.go
136 lines (118 loc) · 3.36 KB
/
model.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
package bitbucketcloud
type User struct {
UserName string `json:"username"`
Website string `json:"website"`
DisplayName string `json:"display_name"`
AccountID string `json:"account_id"`
Links *Links `json:"links"`
}
type Links struct {
HTML Link `json:"html"`
Avatar Link `json:"avatar"`
Clone []Link `json:"clone"`
}
type Link struct {
Href string `json:"href"`
Name string `json:"name"`
}
type Repository struct {
Scm string `json:"scm"`
Website string `json:"website"`
HasWiki bool `json:"has_wiki"`
Name string `json:"name"`
Links *Links `json:"links"`
ForkPolicy string `json:"fork_policy"`
Language string `json:"language"`
MainBranch Object `json:"mainbranch"`
FullName string `json:"full_name"`
HasIssues bool `json:"has_issues"`
Owner *User `json:"owner"`
IsPrivate bool `json:"is_private"`
Description string `json:"description"`
}
type PaginatedRepositories struct {
Paging
Values []Repository `json:"values"`
}
type Paging struct {
Size int `json:"size"`
Page int `json:"page"`
PageLength int `json:"pagelen"`
Next string `json:"next"`
Previous string `json:"previous"`
}
type Hook struct {
UUID string `json:"uuid"`
Description string `json:"description"`
Links *Links `json:"links"`
URL string `json:"url"`
SkipCertVerification bool `json:"skip_cert_verification"`
Active bool `json:"active"`
Events []string `json:"events"`
}
type PaginatedHooks struct {
Paging
Values []Hook `json:"values"`
}
type Ref struct {
Type string `json:"type"`
Name string `json:"name"`
Links *Links `json:"links"`
Target *Target `json:"target"`
}
type PaginatedBranches struct {
Paging
Values []Ref `json:"values"`
}
type Target struct {
Hash string `json:"hash"`
Repository *Repository `json:"repository"`
Links *Links `json:"links"`
Author *Author `json:"author"`
Date string `json:"date"`
Message string `json:"message"`
}
type Author struct {
Raw string `json:"raw"`
User *User `json:"user"`
}
type Object struct {
Type string `json:"type"`
Name string `json:"name"`
}
type PushEventPayload struct {
Actor User `json:"actor"`
Repository Repository `json:"repository"`
Push struct {
Changes []Change `json:"changes"`
} `json:"push"`
}
type Change struct {
New Ref `json:"new"`
}
type PullRequestEventPayload struct {
Actor User `json:"actor"`
PullRequest PullRequest `json:"pullrequest"`
Repository Repository `json:"repository"`
}
type PullRequest struct {
ID int `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
State string `json:"state"`
Author User `json:"author"`
Source PullRequestEndpoint `json:"source"`
Destination PullRequestEndpoint `json:"destination"`
Links Links `json:"links"`
Created string `json:"created_on"`
Updated string `json:"updated_on"`
}
type PullRequestEndpoint struct {
Branch struct {
Name string `json:"name"`
} `json:"branch"`
Commit struct {
Hash string `json:"hash"`
} `json:"commit"`
Repository Repository `json:"repository"`
}