[PATCH RFC aiaiai 08/11] aiaiai: change dispatcher hook to email hook

Artem Bityutskiy dedekind1 at gmail.com
Mon Mar 31 01:40:39 PDT 2014


On Thu, 2014-03-27 at 11:40 -0700, Jacob Keller wrote:
> +# Run the aiaiai email hook. Output is stored in $hookoutput and we can parse
> +# this via fetch_header similar to how we parse the mbox.
> +hookfile="$(readlink -ev -- $cfg_email_hook)"

Re-named 'hookfile' to 'hookscript', to make it a bit more obvious that
this is an executable, not just some file.

> +if [ -f "$hookfile" ] && [ -x "$hookfile" ]; then
> +	# Hook points to an executable file, so we run it
> +	verbose "Executing \"$hookfile\""
> +	if ! $hookfile $cfgfile $mbox > $hookoutput; then
> +		# Save return immediately, so we don't lose it!
> +		hookret=$?

Removed the comment, since it seem to comment an obvious thing, if you
do not mind.

> +
> +		# Error code 127 is an expected output of the hook, and
> +		# indicates that we should reject this patch. The reply email
> +		# will be sent to the user, and the hook is expected to have
> +		# outputted the rejection indication. As a precaution, the
> +		# rejection email will include a list of projects supported.
> +		if [ "$hookref" -eq "127" ]; then

Changed 'hookref' to 'hookret' here, obvious typo.

> +			error_hook_rejected_patch < $hookoutput

Added few quotes too.

-- 
Best Regards,
Artem Bityutskiy




More information about the aiaiai mailing list