102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
# File 'lib/fastlane/plugin/jira_util/actions/update_jira_version.rb', line 102
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :url,
env_name: "FL_JIRA_UTIL_SITE",
description: "URL for Jira instance",
type: String,
verify_block: proc do |value|
UI.user_error!("No url for Jira given, pass using `url: 'url'`") unless value and !value.empty?
end),
FastlaneCore::ConfigItem.new(key: :username,
env_name: "FL_JIRA_UTIL_USERNAME",
description: "Username for JIRA instance",
type: String,
verify_block: proc do |value|
UI.user_error!("No username given, pass using `username: 'jira_user'`") unless value and !value.empty?
end),
FastlaneCore::ConfigItem.new(key: :password,
env_name: "FL_JIRA_UTIL_PASSWORD",
description: "Password for Jira",
type: String,
verify_block: proc do |value|
UI.user_error!("No password given, pass using `password: 'T0PS3CR3T'`") unless value and !value.empty?
end),
FastlaneCore::ConfigItem.new(key: :project_name,
env_name: "FL_JIRA_UTIL_PROJECT_NAME",
description: "Project ID for the JIRA project. E.g. the short abbreviation in the JIRA ticket tags",
type: String,
optional: true,
conflicting_options: [:project_id],
conflict_block: proc do |value|
UI.user_error!("You can't use 'project_name' and '#{project_id}' options in one run")
end,
verify_block: proc do |value|
UI.user_error!("No Project ID given, pass using `project_id: 'PROJID'`") unless value and !value.empty?
end),
FastlaneCore::ConfigItem.new(key: :project_id,
env_name: "FL_JIRA_UTIL_PROJECT_ID",
description: "Project ID for the JIRA project. E.g. the short abbreviation in the JIRA ticket tags",
type: String,
optional: true,
conflicting_options: [:project_name],
conflict_block: proc do |value|
UI.user_error!("You can't use 'project_id' and '#{project_name}' options in one run")
end,
verify_block: proc do |value|
UI.user_error!("No Project ID given, pass using `project_id: 'PROJID'`") unless value and !value.empty?
end),
FastlaneCore::ConfigItem.new(key: :id,
description: "JIRA version id. E.g. 123456",
optional: true,
conflicting_options: [ :name ],
conflict_block: proc do |value|
UI.user_error!("You can't use 'id' and 'name' options in one run")
end,
verify_block: proc do |value|
UI.user_error!("Empty verison id") unless value and !value.empty?
end),
FastlaneCore::ConfigItem.new(key: :name,
description: "JIRA version name",
is_string: false,
optional: true,
conflicting_options: [:id],
conflict_block: proc do |value|
UI.user_error!("You can't use 'id' and 'name' options in one run")
end,
verify_block: proc do |value|
UI.user_error!("Empty verison name") unless value and !value.empty?
end),
FastlaneCore::ConfigItem.new(key: :new_name,
optional: true,
description: "New name for the version. E.g. 1.0.0",
verify_block: proc do |value|
UI.user_error!("new_name is empty") unless value and !value.empty?
end),
FastlaneCore::ConfigItem.new(key: :description,
optional: true,
description: "The description of the JIRA project version"),
FastlaneCore::ConfigItem.new(key: :archived,
description: "Whether the version should be archived",
optional: true,
is_string: false),
FastlaneCore::ConfigItem.new(key: :released,
description: "Whether the version should be released",
optional: true,
is_string: false),
FastlaneCore::ConfigItem.new(key: :start_date,
description: "The date this version will start on",
type: String,
is_string: true,
optional: true)
]
end
|