some initial work on a builtin build runner

This commit is contained in:
Brad Rydzewski
2015-05-05 01:04:20 -07:00
parent 51e995e0a1
commit 204fba9018
12 changed files with 624 additions and 45 deletions

View File

@@ -172,7 +172,11 @@ func GetHook(client *github.Client, owner, name, url string) (*github.Hook, erro
return nil, err
}
for _, hook := range hooks {
if strings.HasPrefix(hook.Config["url"].(string), url) {
hookurl, ok := hook.Config["url"].(string)
if !ok {
continue
}
if strings.HasPrefix(hookurl, url) {
return &hook, nil
}
}