diff --git a/scripts/bugzilla-create b/scripts/bugzilla-create index 4c6f8e3..50719db 100755 --- a/scripts/bugzilla-create +++ b/scripts/bugzilla-create @@ -86,8 +86,9 @@ Options: * Print this message Notes: - * If no email address specified, the username component of git-config - user.email will be used with @suse.com appended. + * If no email address is specified with -e option or BUGZILLA_ACCOUNT_EMAIL + environment variable, the username component of git-config user.email + will be used with @suse.com appended. * If no product is specified, the \$BUGZILLA_PRODUCT variable in rpm/config.sh will be used, if present. * If the patch already contains references, they will be preserved with @@ -102,8 +103,13 @@ END } # Defaults -EMAIL="$(git config user.email)" -EMAIL="${EMAIL%%@*}@suse.com" +if [ -n "${BUGZILLA_ACCOUNT_EMAIL}" ] +then + EMAIL="${BUGZILLA_ACCOUNT_EMAIL}" +else + EMAIL="$(git config user.email)" + EMAIL="${EMAIL%%@*}@suse.com" +fi . $(dirname $0)/../rpm/config.sh PRODUCT="${BUGZILLA_PRODUCT}"