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
```
This commit is contained in:
Jarek Radosz 2021-07-20 20:25:48 +02:00 committed by GitHub
parent 5f6b9e36ed
commit 4223541bc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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" },