Merge remote-tracking branch 'origin/0.4.0' into 0.4.0

This commit is contained in:
Brad Rydzewski 2015-06-13 18:42:29 -07:00
commit ef6b621f7f
3 changed files with 11 additions and 5 deletions

View file

@ -26,7 +26,8 @@ secret = ""
expires = "" expires = ""
[database] [database]
path = "/etc/drone/drone.db" driver="sqlite3"
datasource="/var/lib/drone/drone.sqlite"
[docker] [docker]
cert = "" cert = ""

View file

@ -8,7 +8,8 @@ key = ""
# expires = "" # expires = ""
[database] [database]
path = "/var/lib/drone/drone.sqlite" driver="sqlite3"
datasource="/var/lib/drone/drone.sqlite"
[docker] [docker]
cert = "" cert = ""
@ -16,7 +17,7 @@ key = ""
addr = "unix:///var/run/docker.sock" addr = "unix:///var/run/docker.sock"
swarm = "" swarm = ""
# [service] # [remote]
# kind = "github" # kind = "github"
# base = "https://github.com" # base = "https://github.com"
# orgs = [] # orgs = []
@ -33,4 +34,3 @@ swarm = ""
# [agents] # [agents]
# secret = "" # secret = ""

View file

@ -251,6 +251,10 @@ func (g *GitHub) push(r *http.Request) (*common.Hook, error) {
return nil, err return nil, err
} }
if hook.Deleted {
return nil, nil
}
repo := &common.Repo{} repo := &common.Repo{}
repo.Owner = hook.Repo.Owner.Login repo.Owner = hook.Repo.Owner.Login
if len(repo.Owner) == 0 { if len(repo.Owner) == 0 {
@ -336,7 +340,8 @@ func (g *GitHub) pullRequest(r *http.Request) (*common.Hook, error) {
} }
type pushHook struct { type pushHook struct {
Ref string `json:"ref"` Ref string `json:"ref"`
Deleted bool `json:"deleted"`
Head struct { Head struct {
ID string `json:"id"` ID string `json:"id"`