Merge pull request #1121 from donny-dont/fix/github-full-name

Handling case where hook.Repo.FullName is not present in Github api
This commit is contained in:
Brad Rydzewski 2015-08-04 14:17:55 -07:00
commit 5f718691ad

View file

@ -273,7 +273,9 @@ func (g *GitHub) push(r *http.Request) (*common.Hook, error) {
repo.Owner = hook.Repo.Owner.Name repo.Owner = hook.Repo.Owner.Name
} }
repo.Name = hook.Repo.Name repo.Name = hook.Repo.Name
repo.FullName = hook.Repo.FullName // Generating rather than using hook.Repo.FullName as it's
// not always present
repo.FullName = fmt.Sprintf("%s/%s", repo.Owner, repo.Name)
repo.Link = hook.Repo.HTMLURL repo.Link = hook.Repo.HTMLURL
repo.Private = hook.Repo.Private repo.Private = hook.Repo.Private
repo.Clone = hook.Repo.CloneURL repo.Clone = hook.Repo.CloneURL