From ccd28908db92bdeb0d84f2d198287f19974d700a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adnan=20Hajdarevi=C4=87?= Date: Thu, 8 Jun 2017 11:16:41 +0200 Subject: [PATCH 1/2] Create README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6848352..f6f9695 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you don't have time to waste configuring, hosting, debugging and maintaining For example, if you're using Github or Bitbucket, you can use [webhook](https://github.com/adnanh/webhook/) to set up a hook that runs a redeploy script for your project on your staging server, whenever you push changes to the master branch of your project. -If you use Slack, you can set up an "Outgoing webhook integration" to run various commands on your server, which can then report back directly to your Slack channels using the "Incoming webhook integrations". +If you use Mattermost or Slack, you can set up an "Outgoing webhook integration" or "Slash command" to run various commands on your server, which can then report back directly to you or your channels using the "Incoming webhook integrations", or the appropriate response body. [webhook](https://github.com/adnanh/webhook/) aims to do nothing more than it should do, and that is: 1. receive the request, From 3a75bbf4db29acbd40ba6f9006113aa65e5d199e Mon Sep 17 00:00:00 2001 From: ilkelma Date: Tue, 13 Jun 2017 16:23:59 -0400 Subject: [PATCH 2/2] Change to CombinedOutput to consume Stderr as well --- webhook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webhook.go b/webhook.go index 3af1ba0..f19c8aa 100644 --- a/webhook.go +++ b/webhook.go @@ -326,7 +326,7 @@ func handleHook(h *hook.Hook, headers, query, payload *map[string]interface{}, b log.Printf("executing %s (%s) with arguments %q and environment %s using %s as cwd\n", h.ExecuteCommand, cmd.Path, cmd.Args, envs, cmd.Dir) - out, err := cmd.Output() + out, err := cmd.CombinedOutput() log.Printf("command output: %s\n", out)