send-pull-request: Fetch TO email address from git config if specified
Usually people using git send-email has git config sendmail.to configured to the usual mailing list or person so we harness that here. (From OE-Core rev: dae83a48f86fd5907cc999e912f476c89debd0bb) Signed-off-by: Khem Raj <raj.khem@gmail.com> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
c6d6e49d07
commit
9a1ee6de17
|
@ -109,15 +109,17 @@ if [ $AUTO -eq 1 ]; then
|
||||||
harvest_recipients CC "^.*-[Bb][Yy]: *"
|
harvest_recipients CC "^.*-[Bb][Yy]: *"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$TO" ] && [ -z "$CC" ]; then
|
|
||||||
echo "ERROR: you have not specified any recipients."
|
|
||||||
usage
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$PULL_MTA" in
|
case "$PULL_MTA" in
|
||||||
git)
|
git)
|
||||||
FROM="$(git config sendemail.from)"
|
FROM="$(git config sendemail.from)"
|
||||||
|
AUTO_TO="$(git config sendemail.to)"
|
||||||
|
if [ -n "$AUTO_TO" ]; then
|
||||||
|
if [ -n "$TO" ]; then
|
||||||
|
TO="$TO,$AUTO_TO"
|
||||||
|
else
|
||||||
|
TO="$AUTO_TO"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
sendmail)
|
sendmail)
|
||||||
if [ -z "$FROM" ]; then
|
if [ -z "$FROM" ]; then
|
||||||
|
@ -131,6 +133,13 @@ case "$PULL_MTA" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [ -z "$TO" ] && [ -z "$CC" ]; then
|
||||||
|
echo "ERROR: you have not specified any recipients."
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Generate report for the user and require confirmation before sending
|
# Generate report for the user and require confirmation before sending
|
||||||
cat <<EOM
|
cat <<EOM
|
||||||
The following patches:
|
The following patches:
|
||||||
|
|
Loading…
Reference in New Issue