2015-09-30 03:21:17 +02:00
|
|
|
package github
|
|
|
|
|
2016-05-03 22:01:16 +02:00
|
|
|
type webhook struct {
|
2015-09-30 03:21:17 +02:00
|
|
|
Ref string `json:"ref"`
|
2016-05-03 22:01:16 +02:00
|
|
|
Action string `json:"action"`
|
2015-09-30 03:21:17 +02:00
|
|
|
Deleted bool `json:"deleted"`
|
2017-09-15 01:53:52 +02:00
|
|
|
BaseRef string `json:"base_ref"`
|
2015-09-30 03:21:17 +02:00
|
|
|
|
|
|
|
Head struct {
|
|
|
|
ID string `json:"id"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
Message string `json:"message"`
|
|
|
|
Timestamp string `json:"timestamp"`
|
|
|
|
|
|
|
|
Author struct {
|
|
|
|
Name string `json:"name"`
|
2017-03-01 18:47:46 +02:00
|
|
|
Email string `json:"email"`
|
2015-09-30 03:21:17 +02:00
|
|
|
Username string `json:"username"`
|
|
|
|
} `json:"author"`
|
|
|
|
|
|
|
|
Committer struct {
|
|
|
|
Name string `json:"name"`
|
2017-03-01 18:47:46 +02:00
|
|
|
Email string `json:"email"`
|
2015-09-30 03:21:17 +02:00
|
|
|
Username string `json:"username"`
|
|
|
|
} `json:"committer"`
|
|
|
|
} `json:"head_commit"`
|
|
|
|
|
|
|
|
Sender struct {
|
|
|
|
Login string `json:"login"`
|
|
|
|
Avatar string `json:"avatar_url"`
|
2015-10-27 02:29:29 +02:00
|
|
|
} `json:"sender"`
|
|
|
|
|
2016-05-03 22:01:16 +02:00
|
|
|
// repository details
|
2015-10-27 02:29:29 +02:00
|
|
|
Repo struct {
|
|
|
|
Owner struct {
|
|
|
|
Login string `json:"login"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
} `json:"owner"`
|
|
|
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
FullName string `json:"full_name"`
|
|
|
|
Language string `json:"language"`
|
|
|
|
Private bool `json:"private"`
|
|
|
|
HTMLURL string `json:"html_url"`
|
|
|
|
CloneURL string `json:"clone_url"`
|
|
|
|
DefaultBranch string `json:"default_branch"`
|
|
|
|
} `json:"repository"`
|
|
|
|
|
2016-05-03 22:01:16 +02:00
|
|
|
// deployment hook details
|
2015-10-27 02:29:29 +02:00
|
|
|
Deployment struct {
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
Sha string `json:"sha"`
|
|
|
|
Ref string `json:"ref"`
|
|
|
|
Task string `json:"task"`
|
|
|
|
Env string `json:"environment"`
|
2016-05-03 02:47:58 +02:00
|
|
|
URL string `json:"url"`
|
2015-10-27 02:29:29 +02:00
|
|
|
Desc string `json:"description"`
|
|
|
|
} `json:"deployment"`
|
|
|
|
|
2016-05-03 22:01:16 +02:00
|
|
|
// pull request details
|
|
|
|
PullRequest struct {
|
|
|
|
Number int `json:"number"`
|
|
|
|
State string `json:"state"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
HTMLURL string `json:"html_url"`
|
2015-10-27 23:53:55 +02:00
|
|
|
|
2016-05-03 22:01:16 +02:00
|
|
|
User struct {
|
|
|
|
Login string `json:"login"`
|
|
|
|
Avatar string `json:"avatar_url"`
|
|
|
|
} `json:"user"`
|
2015-10-27 23:53:55 +02:00
|
|
|
|
2016-11-19 23:36:07 +02:00
|
|
|
Base struct {
|
|
|
|
Ref string `json:"ref"`
|
|
|
|
} `json:"base"`
|
|
|
|
|
2016-05-03 22:01:16 +02:00
|
|
|
Head struct {
|
2016-11-19 23:54:05 +02:00
|
|
|
SHA string `json:"sha"`
|
|
|
|
Ref string `json:"ref"`
|
|
|
|
Repo struct {
|
|
|
|
CloneURL string `json:"clone_url"`
|
|
|
|
} `json:"repo"`
|
2016-05-03 22:01:16 +02:00
|
|
|
} `json:"head"`
|
|
|
|
} `json:"pull_request"`
|
2015-09-30 03:21:17 +02:00
|
|
|
}
|