Skip to content

Commit

Permalink
Added support for specifying a secret
Browse files Browse the repository at this point in the history
  • Loading branch information
mtiller committed Aug 30, 2014
1 parent 4e9fde2 commit f728926
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docker/gopath/src/xogeny/pubbook/pubbook.go
Expand Up @@ -82,10 +82,10 @@ func (b Builder) Push(msg hs.HubMessage, params map[string][]string) {
log.Printf("Ref: %s", ref);
log.Printf("Targets: %v", targets);

// TODO: Get these from query parameters

dir := path.Join("_cache", user);

// TODO: Create a lock file and check for it...

diri, err := os.Stat(dir);

exists := err==nil && diri.IsDir();
Expand Down Expand Up @@ -123,7 +123,9 @@ func (b Builder) Push(msg hs.HubMessage, params map[string][]string) {
}

func main() {
h := hs.NewHookSink("");
secret := os.Getenv("MBE_WEBHOOK_SECRET");
log.Printf("Secret = '%s'", secret);
h := hs.NewHookSink(secret);
h.Add("/build", Builder{Debug: true});
h.Start();
}

0 comments on commit f728926

Please sign in to comment.