External Hook executes but does't return any remote output

The external hook plugin works and executes as expected but doesn't return any output via git remote

I am just trying to do some post operations but I want those remote operations to be visible to the users.

~/git/stash-test $ git push origin master
Counting objects: 13, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 292 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
To git@git.priv.intermedix.com:stas/stash-test.git
   5bfd072..661a51e  master -> master
        echo "Script name: $0"
        echo "Positional arguments: ${@}"
        while read from_ref to_ref ref_name; do
                echo "Ref update:"
                echo " Old value: $from_ref"
                echo " New value: $to_ref"
                echo " Ref name:  $ref_name"
                echo " Diff:"
                git show $to_ref | sed 's/^/  /'
) | tee -a /tmp/external-hooks-test.log
Script name: /opt/test.sh
Positional arguments: test_param
STASH_USER_NAME: matt.trisoline
STASH_USER_EMAIL: matt.trisoline@intermedix.com
STASH_REPO_NAME: stash-test
Ref update:
 Old value: 5bfd07267a472b56c8392aa0c97ef9f971619aa3
 New value: 661a51efdb350d1a4a00722c654b1cfb96771502
 Ref name:  refs/heads/master
  commit 661a51efdb350d1a4a00722c654b1cfb96771502
  Author: Matthew Trisoline <matt.trisoline@intermedix.com>
  Date:   Mon Oct 27 17:26:17 2014 -0400
  diff --git a/bang b/bang
  index db791df..a3af400 100644
  --- a/bang
  +++ b/bang
  @@ -1,4 +1,3 @@

1 answer

Please, read section in https://github.com/ngsru/atlassian-external-hooks/wiki/Configuration about configuration.

Currently, Stash run all post-receive asynchronously, so it's Stash limitation. Currently there is no way to get output from post-receive hook.

However, you can give feedback to user in pre-receive hook, it will receive all data that post-receive hook can receive, so it's should be no problem.

Suggest an answer

Log in or Join to answer
Community showcase
Jason Wong
Published yesterday in Agility Beta

Welcome to agility

Every team in the world is unique, and so   Atlassian believes   that each and every team's best way of working  needs to  be molded to their unique circumstances  – ...

311 views 6 15
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot