diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-23 12:08:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-23 12:08:09 +0300 |
commit | 5831f05b4ce3e5af23c98a8c9495419509df6d62 (patch) | |
tree | 9b797e9fe9f0d32972b92072962e0838135a117f /scripts | |
parent | 784a3db6274bf16a64d2cd947d42182c85cf605f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/internal_events/cli/event_definer.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/internal_events/cli/event_definer.rb b/scripts/internal_events/cli/event_definer.rb index e029f0e7cf6..54f81a62dd1 100755 --- a/scripts/internal_events/cli/event_definer.rb +++ b/scripts/internal_events/cli/event_definer.rb @@ -71,9 +71,9 @@ module InternalEventsCli event.action = cli.ask("Define the event name: #{input_required_text}", **input_opts) do |q| q.required true - q.validate ->(input) { input =~ /\A\w+\z/ && !events_by_filepath.values.map(&:action).include?(input) } # rubocop:disable Rails/NegateInclude -- Not rails + q.validate ->(input) { input =~ /\A[a-z1-9_]+\z/ && !events_by_filepath.values.map(&:action).include?(input) } # rubocop:disable Rails/NegateInclude -- Not rails q.modify :trim - q.messages[:valid?] = format_warning("Invalid event name. Only letters/numbers/underscores allowed. " \ + q.messages[:valid?] = format_warning("Invalid event name. Only lowercase/numbers/underscores allowed. " \ "Ensure %{value} is not an existing event.") q.messages[:required?] = Text::EVENT_ACTION_HELP end |