From 89a88256dea5d141a6f0870ed0013bf81f13bf1e Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Fri, 7 Feb 2014 03:26:26 -0700 Subject: [PATCH] altered hook to pull yaml using hash, not branch --- pkg/handler/hooks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/handler/hooks.go b/pkg/handler/hooks.go index bd2c26a2c..f2d78fed1 100644 --- a/pkg/handler/hooks.go +++ b/pkg/handler/hooks.go @@ -102,7 +102,7 @@ func Hook(w http.ResponseWriter, r *http.Request) error { // get the drone.yml file from GitHub client := github.New(user.GithubToken) - content, err := client.Contents.FindRef(repo.Owner, repo.Slug, ".drone.yml", commit.Branch) // TODO should this really be the hash?? + content, err := client.Contents.FindRef(repo.Owner, repo.Slug, ".drone.yml", commit.Hash) if err != nil { msg := "No .drone.yml was found in this repository. You need to add one.\n" if err := saveFailedBuild(commit, msg); err != nil {