Rather than determining the project strictly from the +project portion
of the aiaiai address, also allow the dispatcher hook to insert the
project hook into the mbox header. This could be used to allow advanced
configuration of the project, such as by checking patch diffs to see
which files are modified.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
patch series. This helps indicate that the entire patch series was validated,
instead of appearing as though only the first patch was tested.
+The following headers will be used if available, and may be helpful for hooks
+to set them, in order to help customize aiaiai.
+
+* X-Aiaiai-Project
+ This header tells aiaiai which project should be used. It overrides the
+ default +project from the email address, and could be set in a scenario
+ where the project is not specified by address.
+
2.4.1 Dispatcher Hook
~~~~~~~~~~~~~~~~~~~~~
mbox="$tmpdir/mbox"
# Find out the project name
-prj="$(fetch_project_name "$to" "$cfg_ownmail")"
+prj="$(fetch_header "X-Aiaiai-Project" < "$mbox")"
+[ -n "$prj" ] || prj="$(fetch_project_name "$to" "$cfg_ownmail")"
verbose "Project \"$prj\""
# Replies will refer the first patch of the patch-set under test