When using Stash (Bitbucket Server) and the External-Hooks add-on, the git_webhook type is unable to modify (create/change) the parameters for the external-hooks add-on because the safe_path attribute needs to be set when hitting the API.
-X PUT -d '{"exe":"debug.sh", "params":"-a foo", "safe_path":true}'
Specifically, if using a Stash user account that only has admin rights to a project/repo, then the exe executable must be in $STASH_HOME/external-hooks, and the path must be relative to that directory. When doing that, safe_path must be set to true or else the API will not allow the change.
If using a Stash user account that has global admin rights (like the default 'admin' user), then safe_path doesn't need to be managed and the exe does not have to be in the $STASH_HOME/external-hooks directory. In which case an absolute path to the exe should be used.
When using Stash (Bitbucket Server) and the External-Hooks add-on, the
git_webhooktype is unable to modify (create/change) the parameters for the external-hooks add-on because thesafe_pathattribute needs to be set when hitting the API.Specifically, if using a Stash user account that only has admin rights to a project/repo, then the
exeexecutable must be in$STASH_HOME/external-hooks, and the path must be relative to that directory. When doing that,safe_pathmust be set to true or else the API will not allow the change.If using a Stash user account that has global admin rights (like the default 'admin' user), then
safe_pathdoesn't need to be managed and theexedoes not have to be in the$STASH_HOME/external-hooksdirectory. In which case an absolute path to theexeshould be used.