2015-10-22 23:36:43 +00:00
|
|
|
package gogs
|
|
|
|
|
2016-05-01 23:30:00 +00:00
|
|
|
type pushHook struct {
|
2015-10-22 23:36:43 +00:00
|
|
|
Ref string `json:"ref"`
|
|
|
|
Before string `json:"before"`
|
|
|
|
After string `json:"after"`
|
|
|
|
Compare string `json:"compare_url"`
|
2016-05-06 20:14:19 +00:00
|
|
|
RefType string `json:"ref_type"`
|
2015-10-22 23:36:43 +00:00
|
|
|
|
|
|
|
Pusher struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Email string `json:"email"`
|
2016-11-25 12:06:07 +00:00
|
|
|
Login string `json:"login"`
|
2015-10-22 23:36:43 +00:00
|
|
|
Username string `json:"username"`
|
|
|
|
} `json:"pusher"`
|
|
|
|
|
|
|
|
Repo struct {
|
2016-11-25 12:06:07 +00:00
|
|
|
ID int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
FullName string `json:"full_name"`
|
|
|
|
URL string `json:"html_url"`
|
|
|
|
Private bool `json:"private"`
|
|
|
|
Owner struct {
|
2015-10-22 23:36:43 +00:00
|
|
|
Name string `json:"name"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
Username string `json:"username"`
|
|
|
|
} `json:"owner"`
|
|
|
|
} `json:"repository"`
|
|
|
|
|
|
|
|
Commits []struct {
|
|
|
|
ID string `json:"id"`
|
|
|
|
Message string `json:"message"`
|
2016-05-01 23:30:00 +00:00
|
|
|
URL string `json:"url"`
|
2015-10-22 23:36:43 +00:00
|
|
|
} `json:"commits"`
|
|
|
|
|
|
|
|
Sender struct {
|
2016-11-25 12:06:07 +00:00
|
|
|
ID int64 `json:"id"`
|
|
|
|
Login string `json:"login"`
|
|
|
|
Username string `json:"username"`
|
|
|
|
Avatar string `json:"avatar_url"`
|
2015-10-22 23:36:43 +00:00
|
|
|
} `json:"sender"`
|
|
|
|
}
|
2017-01-03 08:38:05 +00:00
|
|
|
|
|
|
|
type pullRequestHook struct {
|
|
|
|
Action string `json:"action"`
|
|
|
|
Number int64 `json:"number"`
|
|
|
|
PullRequest struct {
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
User struct {
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
Username string `json:"username"`
|
|
|
|
Name string `json:"full_name"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
Avatar string `json:"avatar_url"`
|
|
|
|
} `json:"user"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Body string `json:"body"`
|
|
|
|
Labels []string `json:"labels"`
|
|
|
|
State string `json:"state"`
|
|
|
|
URL string `json:"html_url"`
|
|
|
|
Mergeable bool `json:"mergeable"`
|
|
|
|
Merged bool `json:"merged"`
|
|
|
|
MergeBase string `json:"merge_base"`
|
|
|
|
Base struct {
|
|
|
|
Label string `json:"label"`
|
|
|
|
Ref string `json:"ref"`
|
|
|
|
Sha string `json:"sha"`
|
|
|
|
Repo struct {
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
FullName string `json:"full_name"`
|
|
|
|
URL string `json:"html_url"`
|
|
|
|
Private bool `json:"private"`
|
|
|
|
Owner struct {
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
Username string `json:"username"`
|
|
|
|
Name string `json:"full_name"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
Avatar string `json:"avatar_url"`
|
|
|
|
} `json:"owner"`
|
|
|
|
} `json:"repo"`
|
|
|
|
} `json:"base"`
|
|
|
|
Head struct {
|
|
|
|
Label string `json:"label"`
|
|
|
|
Ref string `json:"ref"`
|
|
|
|
Sha string `json:"sha"`
|
|
|
|
Repo struct {
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
FullName string `json:"full_name"`
|
|
|
|
URL string `json:"html_url"`
|
|
|
|
Private bool `json:"private"`
|
|
|
|
Owner struct {
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
Username string `json:"username"`
|
|
|
|
Name string `json:"full_name"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
Avatar string `json:"avatar_url"`
|
|
|
|
} `json:"owner"`
|
|
|
|
} `json:"repo"`
|
|
|
|
} `json:"head"`
|
|
|
|
} `json:"pull_request"`
|
|
|
|
Repo struct {
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
FullName string `json:"full_name"`
|
|
|
|
URL string `json:"html_url"`
|
|
|
|
Private bool `json:"private"`
|
|
|
|
Owner struct {
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
Username string `json:"username"`
|
|
|
|
Name string `json:"full_name"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
Avatar string `json:"avatar_url"`
|
|
|
|
} `json:"owner"`
|
|
|
|
} `json:"repository"`
|
|
|
|
Sender struct {
|
|
|
|
ID int64 `json:"id"`
|
2017-03-18 08:49:27 +00:00
|
|
|
Login string `json:"login"`
|
2017-01-03 08:38:05 +00:00
|
|
|
Username string `json:"username"`
|
|
|
|
Name string `json:"full_name"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
Avatar string `json:"avatar_url"`
|
|
|
|
} `json:"sender"`
|
|
|
|
}
|