woodpecker/server/remote/github/types.go

103 lines
2.6 KiB
Go
Raw Normal View History

2018-02-19 22:24:10 +00:00
// Copyright 2018 Drone.IO Inc.
2018-03-21 13:02:17 +00:00
//
2018-02-19 22:24:10 +00:00
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
2018-03-21 13:02:17 +00:00
//
2018-02-19 22:24:10 +00:00
// http://www.apache.org/licenses/LICENSE-2.0
2018-03-21 13:02:17 +00:00
//
2018-02-19 22:24:10 +00:00
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
2015-09-30 01:21:17 +00:00
package github
type webhook struct {
2015-09-30 01:21:17 +00:00
Ref string `json:"ref"`
Action string `json:"action"`
2015-09-30 01:21:17 +00:00
Deleted bool `json:"deleted"`
BaseRef string `json:"base_ref"`
2015-09-30 01:21:17 +00: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 16:47:46 +00:00
Email string `json:"email"`
2015-09-30 01:21:17 +00:00
Username string `json:"username"`
} `json:"author"`
Committer struct {
Name string `json:"name"`
2017-03-01 16:47:46 +00:00
Email string `json:"email"`
2015-09-30 01:21:17 +00:00
Username string `json:"username"`
} `json:"committer"`
Added []string `json:"added"`
Removed []string `json:"removed"`
Modified []string `json:"modified"`
2015-09-30 01:21:17 +00:00
} `json:"head_commit"`
Sender struct {
Login string `json:"login"`
Avatar string `json:"avatar_url"`
} `json:"sender"`
// repository details
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"`
// deployment hook details
Deployment struct {
ID int64 `json:"id"`
Sha string `json:"sha"`
Ref string `json:"ref"`
Task string `json:"task"`
Env string `json:"environment"`
URL string `json:"url"`
Desc string `json:"description"`
} `json:"deployment"`
// pull request details
PullRequest struct {
Number int `json:"number"`
State string `json:"state"`
Title string `json:"title"`
HTMLURL string `json:"html_url"`
User struct {
Login string `json:"login"`
Avatar string `json:"avatar_url"`
} `json:"user"`
2016-11-19 21:36:07 +00:00
Base struct {
Ref string `json:"ref"`
} `json:"base"`
Head struct {
2016-11-19 21:54:05 +00:00
SHA string `json:"sha"`
Ref string `json:"ref"`
Repo struct {
CloneURL string `json:"clone_url"`
} `json:"repo"`
} `json:"head"`
} `json:"pull_request"`
2015-09-30 01:21:17 +00:00
}