Add Bamboo support

This commit is contained in:
chaseshak
2023-08-10 09:20:45 -05:00
parent 4789d65f19
commit 8e7b2472e2
6 changed files with 149 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
# frozen_string_literal: true
module Bamboo
class Audit
include IssueParser
def initialize(issue_content, _)
@project = parameter_from_issue("Project", issue_content)
end
def to_a
args = []
args.push(["--project", @project]) unless @project.nil?
return args unless args.empty?
end
end
end
+20
View File
@@ -0,0 +1,20 @@
# frozen_string_literal: true
module Bamboo
class DryRun
include IssueParser
def initialize(issue_content, command)
@plan_slug = parameter_from_issue("Plan Slug", issue_content)
@plan_type = command.options.fetch("plan-type", "build")
end
def to_a
args = [@plan_type]
args.push(["--plan-slug", @plan_slug]) unless @plan_slug.nil?
return args unless args.empty?
end
end
end
+22
View File
@@ -0,0 +1,22 @@
# frozen_string_literal: true
module Bamboo
class Migrate
include IssueParser
def initialize(issue_content, command)
@plan_slug = parameter_from_issue("Plan Slug", issue_content)
@plan_type = command.options.fetch("plan-type", "build")
@target_url = command.options["target-url"]
end
def to_a
args = [@plan_type]
args.push(["--plan-slug", @plan_slug]) unless @plan_slug.nil?
args.push(["--target-url", @target_url]) unless @target_url.nil?
return args unless args.empty?
end
end
end