Class: Fastlane::Actions::MoveTicketsAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/apadmi_grout/actions/move_tickets_action.rb

Overview

Move JIRA tickets and generate release notes

Class Method Summary collapse

Class Method Details

.authorsObject



28
29
30
# File 'lib/fastlane/plugin/apadmi_grout/actions/move_tickets_action.rb', line 28

def self.authors
  ["[email protected]"]
end

.available_optionsObject



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/fastlane/plugin/apadmi_grout/actions/move_tickets_action.rb', line 32

def self.available_options
  Apadmi::Grout::CommonOptions.board_options + [
    FastlaneCore::ConfigItem.new(key: :board_status_to,
                                 description: "The JIRA status to move the tickets to",
                                 env_name: "BOARD_STATUS_TO",
                                 type: String,
                                 verify_block: proc do |value|
                                   UI.user_error!("Didn't pass a valid JIRA status") unless value
                                 end,
                                 optional: false),
    FastlaneCore::ConfigItem.new(key: :versions,
                                 description: "The versions to add to the jira ticket",
                                 type: Array,
                                 verify_block: proc do |value|
                                   UI.user_error!("Didn't pass a valid array of versions") unless value || value.empty
                                 end,
                                 optional: false),
    FastlaneCore::ConfigItem.new(key: :issues,
                                 description: "The issues to be moved",
                                 type: Array,
                                 verify_block: proc do |value|
                                   UI.user_error!("Didn't pass a valid array of issues") unless value
                                 end,
                                 optional: false)
  ]
end

.descriptionObject



24
25
26
# File 'lib/fastlane/plugin/apadmi_grout/actions/move_tickets_action.rb', line 24

def self.description
  "Convenience lane that moves all supplied jira tickets to new status and assigns versions."
end

.is_supported?(_platform) ⇒ Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/fastlane/plugin/apadmi_grout/actions/move_tickets_action.rb', line 59

def self.is_supported?(_platform)
  true
end

.run(params) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/fastlane/plugin/apadmi_grout/actions/move_tickets_action.rb', line 11

def self.run(params)
  logger = FastLane::FastlaneLogger.new
  logger.message("Moving #{params[:board_provider]} tickets")

  build_tools = Apadmi::Grout::DIWrapper.di(params, logger)

  build_tools.move_tickets_action.run(
    params[:versions],
    params[:issues],
    params[:board_status_to]
  )
end