Commit 7a7674cd authored by Alex Kalderimis's avatar Alex Kalderimis Committed by Rajendra Kadam

Apply 2 suggestion(s) to 2 file(s)

parent 6c9e6395
......@@ -86,7 +86,7 @@ The generator takes three options:
- `--ee`: Indicates if the event is for EE.
- `--category=CATEGORY`: Indicates the `category` of the event.
- `--action=ACTION`: Indicates the `action` of the event.
- `--force`: Force flag to overwrite existing event definition.
- `--force`: Overwrite existing event definition, if one already exists.
```shell
bundle exec rails generate gitlab:snowplow_event_definition --category Groups::EmailCampaignsController --action click
......
......@@ -14,7 +14,7 @@ module Gitlab
class_option :ee, type: :boolean, optional: true, default: false, desc: 'Indicates if event is for ee'
class_option :category, type: :string, optional: false, desc: 'Category of the event'
class_option :action, type: :string, optional: false, desc: 'Action of the event'
class_option :force, type: :boolean, optional: true, default: false, desc: 'Force definition override'
class_option :force, type: :boolean, optional: true, default: false, desc: 'Overwrite existing definition'
def create_event_file
raise "Event definition already exists at #{file_path}" if definition_exists? && !force_definition_override?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment