diff --git a/README.md b/README.md index 3d398581d..1db803a53 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,8 @@ secret = "" expires = "" [database] -path = "/etc/drone/drone.db" +driver="sqlite3" +datasource="/var/lib/drone/drone.sqlite" [docker] cert = "" diff --git a/dist/drone/etc/drone/drone.toml b/dist/drone/etc/drone/drone.toml index 4fb4f0c00..195c8cf6f 100644 --- a/dist/drone/etc/drone/drone.toml +++ b/dist/drone/etc/drone/drone.toml @@ -8,7 +8,8 @@ key = "" # expires = "" [database] -path = "/var/lib/drone/drone.sqlite" +driver="sqlite3" +datasource="/var/lib/drone/drone.sqlite" [docker] cert = "" @@ -16,7 +17,7 @@ key = "" addr = "unix:///var/run/docker.sock" swarm = "" -# [service] +# [remote] # kind = "github" # base = "https://github.com" # orgs = [] @@ -33,4 +34,3 @@ swarm = "" # [agents] # secret = "" - diff --git a/pkg/remote/builtin/github/github.go b/pkg/remote/builtin/github/github.go index 9ff0fe079..5b6fafd85 100644 --- a/pkg/remote/builtin/github/github.go +++ b/pkg/remote/builtin/github/github.go @@ -251,6 +251,10 @@ func (g *GitHub) push(r *http.Request) (*common.Hook, error) { return nil, err } + if hook.Deleted { + return nil, nil + } + repo := &common.Repo{} repo.Owner = hook.Repo.Owner.Login if len(repo.Owner) == 0 { @@ -336,7 +340,8 @@ func (g *GitHub) pullRequest(r *http.Request) (*common.Hook, error) { } type pushHook struct { - Ref string `json:"ref"` + Ref string `json:"ref"` + Deleted bool `json:"deleted"` Head struct { ID string `json:"id"`