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

Keller, Jacob E jacob.e.keller at intel.com
Mon Mar 31 13:40:19 PDT 2014


On Mon, 2014-03-31 at 11:40 +0300, Artem Bityutskiy wrote:
> 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.

Sure. I wasn't sure exactly how obvious it would be.

> 
> > +
> > +		# 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.

Yep. Thanks!

> 
> > +			error_hook_rejected_patch < $hookoutput
> 
> Added few quotes too.
> 

Darn those quotes!

Thanks,
Jake



More information about the aiaiai mailing list