add init variable: err_message
when execute line: err_message += <<~EMAIL_MESSAGE it may throw error: ERROR -- : exception while processing events: undefined method `+' for nil:NilClass Backtrace:
Signed-off-by: Luan Shengde shdluan@163.com --- container/mail-robot/lib/assign-account-fail-eamil.rb | 1 + 1 file changed, 1 insertion(+)
diff --git a/container/mail-robot/lib/assign-account-fail-eamil.rb b/container/mail-robot/lib/assign-account-fail-eamil.rb index 31692358..a7f43f11 100755 --- a/container/mail-robot/lib/assign-account-fail-eamil.rb +++ b/container/mail-robot/lib/assign-account-fail-eamil.rb @@ -4,6 +4,7 @@ # frozen_string_literal: true
def email_err_message(message) + err_message = '' case message when 'NO_COMMIT_URL' err_message = <<~EMAIL_MESSAGE