We've been using the BitBucket External Hooks to implement pre-receive hook. The External Hook calls a shell script on the server host at <BITBUCKET_HOME>/shared/external-hooks. The hook shell script evaluates the incoming commit, and if certain conditions are not met, rejects the commit push. The condition in the shell script can be (but not limited to) the commit contains any root level file/directory that is not part of the standard structure.
Since BitBucket Data Center 9.4.4 does not support this External Hooks plugin. We have to find alternative method. My question is, can ScriptRunner calls a host shell script, and receive return of the script to either reject or accept the incoming commit?
Any help or hint is greatly appreciated.
Thanks, Andy