Class: Fastlane::Actions::YtSetIssueCustomFieldValueAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::YtSetIssueCustomFieldValueAction
- Defined in:
- lib/fastlane/plugin/youtrack/actions/yt_set_issue_custom_field_value_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .example_code ⇒ Object
- .is_supported?(_) ⇒ Boolean
- .output ⇒ Object
- .return_type ⇒ Object
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
84 85 86 |
# File 'lib/fastlane/plugin/youtrack/actions/yt_set_issue_custom_field_value_action.rb', line 84 def self. ['Semen Kologrivov'] end |
.available_options ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/fastlane/plugin/youtrack/actions/yt_set_issue_custom_field_value_action.rb', line 43 def self. [ FastlaneCore::ConfigItem.new( key: :issue_id, description: 'Identifier of issue', optional: false, type: String ), FastlaneCore::ConfigItem.new( key: :field, description: 'Custom field info', optional: false, type: Hash ), FastlaneCore::ConfigItem.new( key: :field_value, description: 'Value of custom field', optional: false, type: String ), FastlaneCore::ConfigItem.new( key: :base_url, env_name: 'YOUTRACK_BASE_URL', description: 'Base YouTrack URL', optional: false, type: String ), FastlaneCore::ConfigItem.new( key: :access_token, env_name: 'YOUTRACK_API_TOKEN', description: 'Access token for YouTrack API', optional: false, type: String ) ] end |
.description ⇒ Object
35 36 37 |
# File 'lib/fastlane/plugin/youtrack/actions/yt_set_issue_custom_field_value_action.rb', line 35 def self.description 'Set value for passed custom field name' end |
.details ⇒ Object
39 40 41 |
# File 'lib/fastlane/plugin/youtrack/actions/yt_set_issue_custom_field_value_action.rb', line 39 def self.details '' end |
.example_code ⇒ Object
92 93 94 95 96 |
# File 'lib/fastlane/plugin/youtrack/actions/yt_set_issue_custom_field_value_action.rb', line 92 def self.example_code [ 'yt_set_issue_custom_field_value(issue_id: "ios_1234", field_name: "Foo", field_value: "Bar")' ] end |
.is_supported?(_) ⇒ Boolean
88 89 90 |
# File 'lib/fastlane/plugin/youtrack/actions/yt_set_issue_custom_field_value_action.rb', line 88 def self.is_supported?(_) true end |
.output ⇒ Object
98 99 100 101 102 |
# File 'lib/fastlane/plugin/youtrack/actions/yt_set_issue_custom_field_value_action.rb', line 98 def self.output [ [] ] end |
.return_type ⇒ Object
104 105 106 |
# File 'lib/fastlane/plugin/youtrack/actions/yt_set_issue_custom_field_value_action.rb', line 104 def self.return_type :array end |
.return_value ⇒ Object
80 81 82 |
# File 'lib/fastlane/plugin/youtrack/actions/yt_set_issue_custom_field_value_action.rb', line 80 def self.return_value 'Nothing' end |
.run(params) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/fastlane/plugin/youtrack/actions/yt_set_issue_custom_field_value_action.rb', line 7 def self.run(params) issue_id = params[:issue_id] field = params[:field] field_value = params[:field_value] base_url = params[:base_url] access_token = params[:access_token] result = Helper::YoutrackHelper.set_custom_field_value( issue_id, field, field_value, base_url, access_token ) return {} unless result.success? begin response_body = JSON.parse(result.body) rescue JSON::ParserError => e puts e end response_body rescue => ex UI.error(ex) UI.error('Failed') end |