Updating distribution
This commit is contained in:
17
lib/models/gitlab_ci/audit.rb
Normal file
17
lib/models/gitlab_ci/audit.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module GitlabCI
|
||||
class Audit
|
||||
include IssueParser
|
||||
|
||||
def initialize(issue_content, _)
|
||||
@namespace = parameter_from_issue("Namespace", issue_content)
|
||||
end
|
||||
|
||||
def to_a
|
||||
return if @namespace.nil?
|
||||
|
||||
["--namespace", @namespace]
|
||||
end
|
||||
end
|
||||
end
|
||||
20
lib/models/gitlab_ci/dry_run.rb
Normal file
20
lib/models/gitlab_ci/dry_run.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module GitlabCI
|
||||
class DryRun
|
||||
include IssueParser
|
||||
|
||||
def initialize(issue_content, command)
|
||||
@namespace = parameter_from_issue("Namespace", issue_content)
|
||||
@project = command.options["project"]
|
||||
end
|
||||
|
||||
def to_a
|
||||
args = []
|
||||
args.concat(["--namespace", @namespace]) unless @namespace.nil?
|
||||
args.concat(["--project", @project]) unless @project.nil?
|
||||
|
||||
return args unless args.empty?
|
||||
end
|
||||
end
|
||||
end
|
||||
22
lib/models/gitlab_ci/migrate.rb
Normal file
22
lib/models/gitlab_ci/migrate.rb
Normal file
@@ -0,0 +1,22 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module GitlabCI
|
||||
class Migrate
|
||||
include IssueParser
|
||||
|
||||
def initialize(issue_content, command)
|
||||
@namespace = parameter_from_issue("Namespace", issue_content)
|
||||
@project = command.options["project"]
|
||||
@target_url = command.options["target-url"]
|
||||
end
|
||||
|
||||
def to_a
|
||||
args = []
|
||||
args.concat(["--namespace", @namespace]) unless @namespace.nil?
|
||||
args.concat(["--project", @project]) unless @project.nil?
|
||||
args.concat(["--target-url", @target_url]) unless @target_url.nil?
|
||||
|
||||
return args unless args.empty?
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user