DEV: Fix release_note task warnings (#13794)

DEV: Fix release_note task warnings (#13794)

There was a bunch of warnings repeated over and over during spec runs:

/var/www/discourse/lib/tasks/release_note.rake:3: warning: already initialized constant DATE_REGEX
/var/www/discourse/lib/tasks/release_note.rake:3: warning: previous definition of DATE_REGEX was here
/var/www/discourse/lib/tasks/release_note.rake:5: warning: already initialized constant CHANGE_TYPES
/var/www/discourse/lib/tasks/release_note.rake:5: warning: previous definition of CHANGE_TYPES was here
diff --git a/lib/tasks/release_note.rake b/lib/tasks/release_note.rake
index 12d68c1..01bc01b 100644
--- a/lib/tasks/release_note.rake
+++ b/lib/tasks/release_note.rake
@@ -1,8 +1,8 @@
 # frozen_string_literal: true
 
-DATE_REGEX = /\A\d{4}-\d{2}-\d{2}/
+DATE_REGEX ||= /\A\d{4}-\d{2}-\d{2}/
 
-CHANGE_TYPES = [
+CHANGE_TYPES ||= [
   { pattern: /^FEATURE:/, heading: "New Features" },
   { pattern: /^FIX:/, heading: "Bug Fixes" },
   { pattern: /^UX:/, heading: "UX Changes" },

GitHub sha: 4223541bc5ddd901657962f1ff2e2ac1d5b83c8f

This commit appears in #13794 which was approved by eviltrout. It was merged by CvX.