fastlane-plugin-jira_issues_release_notes 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8d5984ded8d97d30b8df79c68c103e923911c516829f203fd1d6b475368f783
4
- data.tar.gz: b6262045d8f11134a0c1037004115b7c17a19e86f1264c2dc69b63d9173743ce
3
+ metadata.gz: e894feb0ef80530060a48ac405ffb1499763677ec0e0b081f56217e8ebad2a74
4
+ data.tar.gz: e26ecc23aafb34452ba96986225502134354dd678628da1080907790e1f3fcfa
5
5
  SHA512:
6
- metadata.gz: e075f8823aad025a3280acab73817ef50161a14003f6dfa76f2a81f9b6ee2dc24664c94fc6345bd7e1d123fe58586f3624a7e8fd1ba44d851ada7f1003f3e7ae
7
- data.tar.gz: 6c841d6bda953fabf5d2ff0f75d4f3e372c6e5b891179df98ca12f8246243d0fdef9f66910d1859fa20268a04b3bdfc00bdb59456f5f13c9d1df4259381d6048
6
+ metadata.gz: 79dbc0a2f9fc8f60c9ce93735673deada3c1add7c1afff3838ebf2bd8821885343360af7ce13d2a4e21baac09f697f67f7a90da02d73c3fca06816cf4236568c
7
+ data.tar.gz: 903103b90403f032883a08a81d733b990ab70b24108e7e1ed34b6bc54b122f4b3791e15cc9533b8a4fd44138e35fc9e2c86c6e4a7d651c75f8fbe355158ec21d
data/README.md CHANGED
@@ -1,6 +1,14 @@
1
- # jira_issues_release_notes plugin
1
+ # Jira Issues Release Notes - Fastlane Plugin
2
2
 
3
3
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-jira_issues_release_notes)
4
+ [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/erick-martins/fastlane-plugin-jira_issues_release_notes/blob/master/LICENSE)
5
+ [![Gem Version](https://badge.fury.io/rb/fastlane-plugin-jira_issues_release_notes.svg)](https://badge.fury.io/rb/fastlane-plugin-jira_issues_release_notes)
6
+
7
+
8
+
9
+ It generates a release note based on the issues keys and descriptions found in the commits and branch name
10
+
11
+
4
12
 
5
13
  ## Getting Started
6
14
 
@@ -10,17 +18,357 @@ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To
10
18
  fastlane add_plugin jira_issues_release_notes
11
19
  ```
12
20
 
13
- ## About jira_issues_release_notes
14
21
 
15
- It generates a release note based on the issues keys and descriptions found in the commits
16
22
 
17
- **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
23
+ ## Actions
24
+
25
+ All actions requires some parameters to access Jira API.
26
+ **These are the arguments the all share:**
27
+
28
+ | Argument | Type | Description | Optional | Default | Env Name |
29
+ | ------------------------ | --------- | -------------------------------- | -------- | ------- | ---------------------------------- |
30
+ | username | `String` | The prefix for yours jira issues | | | `FL_JIRA_USERNAME` |
31
+ | password | `String` | Jira user password | | | `FL_JIRA_PASSWORD` |
32
+ | host | `String` | Jira location | | | `FL_JIRA_HOST` |
33
+ | context_path | `String` | Jira context path | ✓ | Empty | `FL_JIRA_CONTEXT_PATH` |
34
+ | disable_ssl_verification | `Boolean` | Jira SSL Verification mode | ✓ | `false` | `FL_JIRA_DISABLE_SSL_VERIFICATION` |
35
+ | api_version | `String` | Jira api version | ✓ | 2 | `FL_JIRA_API_VERSION` |
36
+
37
+
38
+
39
+ ### jira_issues_keys_from_commits
40
+
41
+ This action returns the list of jira issue keys extracted from your commits since the latest published tag.
42
+
43
+ **Arguments:**
44
+
45
+ | Argument | Type | Description | Optional | Default | Env Name |
46
+ | ----------------- | ------------------- | ---------------------------------------------- | -------- | ----------------- | -------------------------- |
47
+ | tag_prefix | `Regex` | Match prefix to find latest tag. Example: `v*` | | | |
48
+ | ticket_prefix | `String` or `Regex` | The prefix for yours jira issues | ✓ | `[A_Z]+` | `FL_FIND_TICKETS_MATCHING` |
49
+ | tag_version_match | `String` | To parse version number from tag name | ✓ | `/\d+\.\d+\.\d+/` | |
50
+
51
+ **Usage example:**
52
+
53
+ ```ruby
54
+ platform :android do
55
+ lane :develop do
56
+ keys = jira_issues_keys_from_commits(
57
+ tag_prefix: 'v*',
58
+ ticket_prefix: 'ABC',
59
+ username: ENV["FL_JIRA_USERNAME"],
60
+ password: ENV["FL_JIRA_PASSWORD"],
61
+ host: ENV["FL_JIRA_HOST"],
62
+ )
63
+
64
+ puts keys
65
+ end
66
+ end
67
+ ```
68
+
69
+
70
+
71
+ ### jira_feature_validation
72
+
73
+ This action creates a release note based on the issue key extracted from your branch name. For example a branch called `feature/ABC-1234-some-feature` will extract the `ABC-1234` issue key.
74
+
75
+ It should be used to generate version to validate you branch's feature before you merge it.
76
+
77
+ **Arguments:**
78
+
79
+ | Argument | Type | Description | Optional | Default | Env Name |
80
+ | ------------- | --------------------------------------- | ------------------------------------------------------------ | -------- | -------------------- | -------------------------- |
81
+ | ticket_prefix | `String` or `Regex` | The prefix for yours jira issues | ✓ | `[A_Z]+` | `FL_FIND_TICKETS_MATCHING` |
82
+ | extra_fields | `Hash` | A hash of extra Jira fields to display.<br />It should be a hash with key as the label for the key and value as the symbol representing the jira's key:<br />Example: `{ "My Custom Field" => :customfield_1 }` | ✓ | Empty Hash<br />`{}` | |
83
+ | format | `slack`, `markdown` , `html` or `plain` | Defines the result format | ✓ | `markdown` | |
84
+
85
+ **Usage example:**
86
+
87
+ ```ruby
88
+ # Branch: feature/ABC-1234-some-feature
89
+
90
+ platform :android do
91
+ lane :develop do
92
+ # Build a apk for development environment
93
+ build_develop
94
+ link_to_download = upload_to_s3
95
+
96
+ release_notes = jira_feature_validation(
97
+ ticket_prefix: 'ABC',
98
+ username: ENV["FL_JIRA_USERNAME"],
99
+ password: ENV["FL_JIRA_PASSWORD"],
100
+ host: ENV["FL_JIRA_HOST"],
101
+ format: 'slack',
102
+ extra_fields: {
103
+ "What should we test?" => :customfield_1
104
+ }
105
+ )
106
+
107
+ slack(
108
+ pretext: ":android: A new android build is available for feature validation\n#{release_notes}",
109
+ payload: {
110
+ "Download it here" => link_to_download
111
+ },
112
+ success: true
113
+ )
114
+ end
115
+ end
116
+ ```
117
+
118
+
119
+
120
+ ### jira_release_validation
121
+
122
+ This action creates a changelog based on the issue keys extracted from your commits since the latest published tag.
123
+
124
+ It should be used to generate version to validate in QA stage.
125
+
126
+ **Usage example:**
127
+
128
+ ```ruby
129
+ platform :android do
130
+ lane :staging_validation do
131
+ # Build a apk for staging environment
132
+ build_staging
133
+ link_to_download = upload_to_s3
134
+
135
+ release_notes = jira_release_validation(
136
+ tag_prefix: 'v*',
137
+ ticket_prefix: 'ABC',
138
+ username: ENV["FL_JIRA_USERNAME"],
139
+ password: ENV["FL_JIRA_PASSWORD"],
140
+ host: ENV["FL_JIRA_HOST"],
141
+ validated_status: ['To Deploy', 'Done'],
142
+ to_validate_status: ['To Test', 'To QA'],
143
+ format: 'slack',
144
+ )
145
+
146
+ slack(
147
+ pretext: ":android: A new android build is available for QA\n#{release_notes}",
148
+ payload: {
149
+ "Download it here" => link_to_download
150
+ },
151
+ success: true
152
+ )
153
+ end
154
+ end
155
+ ```
156
+
157
+ **Arguments:**
18
158
 
19
- ## Example
159
+ | Argument | Type | Description | Optional | Default | Env Name |
160
+ | ------------------ | --------------------------------------- | ---------------------------------------------- | -------- | ----------------- | ---------------------------- |
161
+ | tag_prefix | `Regex` | Match prefix to find latest tag. Example: `v*` | | | |
162
+ | ticket_prefix | `String` or `Regex` | The prefix for yours jira issues | ✓ | `[A_Z]+` | `FL_FIND_TICKETS_MATCHING` |
163
+ | tag_version_match | `String` | To parse version number from tag name | ✓ | `/\d+\.\d+\.\d+/` | |
164
+ | validated_status | `Array` | List of jira issues status already validated | | | `FL_JIRA_VALIDATED_STATUS` |
165
+ | to_validate_status | `Array` | List of jira issues status to be validated | | | `FL_JIRA_TO_VALIDATE_STATUS` |
166
+ | format | `slack`, `markdown` , `html` or `plain` | Defines the result format | ✓ | `markdown` | |
167
+
168
+
169
+
170
+ ### jira_release_changelog
171
+
172
+ This action creates a changelog based on the issue keys extracted from your commits since the latest published tag.
173
+
174
+ It should be used to generate from a release version.
175
+
176
+ **Usage example:**
177
+
178
+ ```ruby
179
+ platform :android do
180
+ lane :release do
181
+ # Build and release a new version
182
+ build_production
183
+ release_production
184
+
185
+ # Hash with grouped types with names by issue type. Use de key work "ANY_TYPE" as fallback.
186
+ # The ordenation will reflect to the final result.
187
+ grouped_by_types = {
188
+ "Added/Changed" => ["ANY_TYPE"],
189
+ "Fixed" => ["Bug"]
190
+ }
191
+
192
+ release_notes = jira_release_changelog(
193
+ tag_prefix: 'v*',
194
+ ticket_prefix: 'ABC',
195
+ username: ENV["FL_JIRA_USERNAME"],
196
+ password: ENV["FL_JIRA_PASSWORD"],
197
+ host: ENV["FL_JIRA_HOST"],
198
+ grouped_by_types: grouped_by_types,
199
+ format: 'slack',
200
+ )
201
+
202
+ slack(
203
+ pretext: ":android: A new android version was released\n#{release_notes}",
204
+ success: true
205
+ )
206
+ end
207
+ end
208
+ ```
209
+
210
+ **Arguments:**
211
+
212
+ | Argument | Type | Description | Optional | Default | Env Name |
213
+ | ----------------- | --------------------------------------- | ------------------------------------------------------------ | -------- | ----------------- | ------------------------------ |
214
+ | tag_prefix | `Regex` | Match prefix to find latest tag. Example: `v*` | | | |
215
+ | ticket_prefix | `String` or `Regex` | The prefix for yours jira issues | ✓ | `[A_Z]+` | `FL_FIND_TICKETS_MATCHING` |
216
+ | tag_version_match | `String` | To parse version number from tag name | ✓ | `/\d+\.\d+\.\d+/` | |
217
+ | grouped_by_types | `Hash` | Hash with grouped types with names by issue type. Use de key work "ANY_TYPE" as fallback. | | | `FL_JIRA_RELESE_GROUPED_TYPES` |
218
+ | format | `slack`, `markdown` , `html` or `plain` | Defines the result format | ✓ | `markdown` | |
219
+
220
+
221
+
222
+ ### jira_comment
223
+
224
+ This action adds comment to the issue keys extracted from your commits since the latest published tag or the issue extract from the name of the branch.
225
+
226
+ **Usage example:**
227
+
228
+ ```ruby
229
+ def generate_comment_block(version: url:)
230
+ {
231
+ "type" => "doc",
232
+ "version" => 1,
233
+ "content" => [
234
+ {
235
+ "type" => "paragraph",
236
+ "content" => [
237
+ {
238
+ "type" => "text",
239
+ "text" => "A new Android build is available. (#{version})\n",
240
+ "marks" => [
241
+ {
242
+ "type" => "strong"
243
+ }
244
+ ]
245
+ },
246
+ {
247
+ "type" => "text",
248
+ "text" => "Download it here",
249
+ "marks" => [
250
+ {
251
+ "type" => "link",
252
+ "attrs" => {
253
+ "href" => "#{url}",
254
+ "title" => "Download it here"
255
+ }
256
+ }
257
+ ]
258
+ }
259
+ ]
260
+ }
261
+ ]
262
+ }
263
+ end
264
+
265
+ platform :android do
266
+ lane :develop do
267
+ # Build a apk for development environment
268
+ build_develop
269
+ link_to_download = upload_to_s3
270
+
271
+ # Comment on issues
272
+ comment_block = generate_comment_block(
273
+ version: "v2.5.0",
274
+ url: "https://some-link-to-download.com"
275
+ )
276
+
277
+ jira_comment(
278
+ username: ENV["FL_JIRA_USERNAME"],
279
+ password: ENV["FL_JIRA_PASSWORD"],
280
+ host: ENV["FL_JIRA_HOST"],
281
+ ticket_prefix: 'ABC',
282
+ tag_prefix: "v*",
283
+ comment_block: comment_block
284
+ )
285
+ end
286
+
287
+ lane :staging_validation do
288
+ # Build a apk for staging environment
289
+ # Build a apk for staging environment
290
+ build_staging
291
+ link_to_download = upload_to_s3
292
+
293
+ # Comment on issues
294
+ comment_block = generate_comment_block(
295
+ version: "v2.5.0",
296
+ url: "https://some-link-to-download.com"
297
+ )
298
+
299
+ jira_comment(
300
+ username: ENV["FL_JIRA_USERNAME"],
301
+ password: ENV["FL_JIRA_PASSWORD"],
302
+ host: ENV["FL_JIRA_HOST"],
303
+ ticket_prefix: 'ABC',
304
+ extract_from_branch: true,
305
+ comment_block: comment_block
306
+ )
307
+ end
308
+
309
+ lane :release do
310
+ # Build a apk for staging environment
311
+ build_production
312
+ release_production
313
+
314
+ jira_comment(
315
+ username: ENV["FL_JIRA_USERNAME"],
316
+ password: ENV["FL_JIRA_PASSWORD"],
317
+ host: ENV["FL_JIRA_HOST"],
318
+ ticket_prefix: 'ABC',
319
+ extract_from_branch: true,
320
+ comment: "Resolved on version #{version} published #{now_date}"
321
+ )
322
+ end
323
+ end
324
+ ```
325
+
326
+ **Arguments:**
327
+
328
+ | Argument | Type | Description | Optional | Default | Env Name |
329
+ | ------------------- | ------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ----------------- | -------------------------- |
330
+ | tag_prefix | `Regex` | Match prefix to find latest tag. Example: `v*` | ✓<br />Conflicts with `:extract_from_branch`<br /><br />If you set to extract keys from the branch, it should not be set | | |
331
+ | ticket_prefix | `String` or `Regex` | The prefix for yours jira issues | ✓ | `[A_Z]+` | `FL_FIND_TICKETS_MATCHING` |
332
+ | tag_version_match | `String` | To parse version number from tag name | ✓ | `/\d+\.\d+\.\d+/` | |
333
+ | extract_from_branch | `Boolean` | If true it will search for jira issue key in the current branch name. In this case do NOT set `:tag_prefix` | ✓<br />Conflicts with `:tag_prefix`<br /><br />If you set `:tag_prefix`, it should not be set or set to `false` | `false` | |
334
+ | comment | `String` | Comment to add to the ticket | ✓<br />Conflicts with `:comment_block`<br /><br />If you set `:comment_block`, it should not be set. | | |
335
+ | comment_block | `Hash` | Comment block to add to the ticket | ✓<br />Conflicts with `:comment`<br /><br />If you set `:comment`, it should not be set. | | |
336
+
337
+
338
+
339
+ ### jira_versions
340
+
341
+ This action searches jira versions and returns the list
342
+
343
+ **Arguments:**
344
+
345
+ | Argument | Type | Description | Optional | Env Name |
346
+ | ---------- | -------- | ------------------------------------------------------------ | -------- | -------------------- |
347
+ | project_id | `String` | The project ID or project key | | `FL_JIRA_PROJECT_ID` |
348
+ | query | `String` | Filter the results using a literal string. Versions with matching `name` or `description` are returned (case insensitive). | ✓ | |
349
+ | order_by | `String` | Order the results by a field.<br />Valid values: `description`, `-description`, `+description`, `name`, `-name`, `+name`, `releaseDate`, `-releaseDate`, `+releaseDate`, `sequence`, `-sequence`, `+sequence`, `startDate`, `-startDate`, `+startDate` | ✓ | |
350
+ | status | `String` | A list of status values used to filter the results by version status. This parameter accepts a comma-separated list. The status values are `released`, `unreleased`, and `archived`. | ✓ | |
351
+
352
+ **Usage example:**
353
+
354
+ ```ruby
355
+ platform :android do
356
+ lane :release do
357
+ versions = jira_versions(
358
+ project_id: 'ABC',
359
+ query: 'app_v2.5.0',
360
+ status: 'released,archived',
361
+ username: ENV["FL_JIRA_USERNAME"],
362
+ password: ENV["FL_JIRA_PASSWORD"],
363
+ host: ENV["FL_JIRA_HOST"],
364
+ )
365
+
366
+ puts versions
367
+ end
368
+ end
369
+ ```
20
370
 
21
- Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
22
371
 
23
- **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
24
372
 
25
373
  ## Run tests for this plugin
26
374
 
@@ -35,18 +383,26 @@ To automatically fix many of the styling issues, use
35
383
  rubocop -a
36
384
  ```
37
385
 
386
+
387
+
38
388
  ## Issues and Feedback
39
389
 
40
390
  For any other issues and feedback about this plugin, please submit it to this repository.
41
391
 
392
+
393
+
42
394
  ## Troubleshooting
43
395
 
44
396
  If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
45
397
 
398
+
399
+
46
400
  ## Using _fastlane_ Plugins
47
401
 
48
402
  For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
49
403
 
404
+
405
+
50
406
  ## About _fastlane_
51
407
 
52
408
  _fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
@@ -0,0 +1,200 @@
1
+ require 'fastlane/action'
2
+ require_relative '../helper/jira_issues_release_notes_helper'
3
+
4
+ module Fastlane
5
+ module Actions
6
+ module SharedValues
7
+ FL_JIRA_LAST_TAG ||= :S3_APK_OUTPUT_PATH
8
+ FL_JIRA_LAST_TAG_HASH ||= :FL_JIRA_LAST_TAG_HASH
9
+ FL_JIRA_COMMITS_FROM_HASH ||= :FL_JIRA_COMMITS_FROM_HASH
10
+ FL_JIRA_LAST_KEYS_FROM_COMMITS ||= :FL_JIRA_LAST_KEYS_FROM_COMMITS
11
+ FL_JIRA_LAST_ISSUES_FROM_COMMITS ||= :FL_JIRA_LAST_ISSUES_FROM_COMMITS
12
+ end
13
+
14
+ class JiraCommentAction < Action
15
+ def self.run(params)
16
+ api_version = params[:api_version].to_i
17
+
18
+ UI.user_error! "Comments block are only available from api version 3 or earlier" if api_version < 3 and params[:comment_block]
19
+
20
+ @jira_helper = Helper::JiraIssuesReleaseNotesHelper.initialize_jira(
21
+ host: params[:host],
22
+ api_version: api_version,
23
+ username: params[:username],
24
+ password: params[:password],
25
+ context_path: params[:context_path],
26
+ disable_ssl_verification: params[:disable_ssl_verification]
27
+ )
28
+
29
+ issues = []
30
+ if params[:extract_from_branch] then
31
+ branch = other_action.git_branch
32
+ ticket_key = Helper::JiraIssuesReleaseNotesHelper.extract_key_from_branch(
33
+ branch: branch,
34
+ ticket_prefix: params[:ticket_prefix]
35
+ )
36
+
37
+ unless ticket_key
38
+ UI.error "Could not extract issue key from branch #{branch}"
39
+ false
40
+ end
41
+
42
+ issues = @jira_helper.get(keys: [ticket_key])
43
+ else
44
+
45
+ issue_key_regex = Regexp.new("(#{params[:ticket_prefix]}-\\d+)")
46
+
47
+ issues = Helper::JiraIssuesReleaseNotesHelper.get_issues_from_commit_after_latest_tag(
48
+ tag_regex: params[:tag_prefix],
49
+ tag_version_match: params[:tag_version_match],
50
+ issue_key_regex: issue_key_regex,
51
+ debug: params[:debug]
52
+ )
53
+ end
54
+
55
+ unless !issues.empty?
56
+ UI.error "No issue could be matched with (#{params[:ticket_prefix]}-\\d+)"
57
+ false
58
+ end
59
+
60
+ @jira_helper.add_comment(
61
+ comment: params[:comment_block] || params[:comment],
62
+ issues: issues
63
+ )
64
+
65
+ end
66
+
67
+ def self.description
68
+ "It generates a release note based on the issues keys found in branch name and descriptions found in the commits"
69
+ end
70
+
71
+ def self.authors
72
+ ["Erick Martins"]
73
+ end
74
+
75
+ def self.return_value
76
+ "boolean value"
77
+ end
78
+
79
+ def self.details
80
+ # Optional:
81
+ "It generates a release note based on the issues keys found in branch name and descriptions found in the commits"
82
+ end
83
+
84
+ def self.available_options
85
+ conflict_extraction_method = Proc.new do |other|
86
+ UI.user_error! "Unexpected conflict with option #{other}" unless [:extract_from_branch, :tag_prefix].include?(other)
87
+ end
88
+
89
+ conflict_comment = Proc.new do |other|
90
+ UI.user_error! "Unexpected conflict with option #{other}" unless [:comment_block, :comment].include?(other)
91
+ end
92
+
93
+ [
94
+ FastlaneCore::ConfigItem.new(
95
+ key: :tag_prefix,
96
+ description: "Match parameter of git describe. See man page of git describe for more info",
97
+ optional: true,
98
+ conflicting_options: [:extract_from_branch],
99
+ conflict_block: conflict_extraction_method
100
+ ),
101
+ FastlaneCore::ConfigItem.new(
102
+ key: :ticket_prefix,
103
+ env_name: 'FL_FIND_TICKETS_MATCHING',
104
+ description: 'regex to extract ticket numbers',
105
+ default_value: '[A-Z]+',
106
+ optional: true
107
+ ),
108
+ FastlaneCore::ConfigItem.new(
109
+ key: :tag_version_match,
110
+ description: "To parse version number from tag name",
111
+ default_value: '\d+\.\d+\.\d+',
112
+ optional: true
113
+ ),
114
+ FastlaneCore::ConfigItem.new(
115
+ key: :extract_from_branch,
116
+ description: "If true it will search for jira issue key in the current branch name. In this case do NOT set :tag_prefix",
117
+ conflicting_options: [:tag_prefix],
118
+ conflict_block: conflict_extraction_method,
119
+ default_value: false,
120
+ optional: true,
121
+ type: Boolean
122
+ ),
123
+ FastlaneCore::ConfigItem.new(
124
+ key: :comment,
125
+ description: 'Comment to add to the ticket',
126
+ conflicting_options: [:comment_block],
127
+ conflict_block: conflict_comment,
128
+ optional: true,
129
+ type: String,
130
+ ),
131
+ FastlaneCore::ConfigItem.new(
132
+ key: :comment_block,
133
+ description: 'Comment block to add to the ticket',
134
+ conflicting_options: [:comment],
135
+ optional: true,
136
+ conflict_block: conflict_comment,
137
+ type: Hash,
138
+ ),
139
+
140
+ # Jira Client options
141
+ FastlaneCore::ConfigItem.new(
142
+ key: :username,
143
+ env_name: 'FL_JIRA_USERNAME',
144
+ description: 'Jira user',
145
+ optional: false
146
+ ),
147
+ FastlaneCore::ConfigItem.new(
148
+ key: :password,
149
+ env_name: 'FL_JIRA_PASSWORD',
150
+ description: 'Jira user',
151
+ optional: false
152
+ ),
153
+ FastlaneCore::ConfigItem.new(
154
+ key: :host,
155
+ env_name: 'FL_JIRA_HOST',
156
+ description: 'Jira location',
157
+ optional: false
158
+ ),
159
+ FastlaneCore::ConfigItem.new(
160
+ key: :api_version,
161
+ env_name: 'FL_JIRA_API_VERSION',
162
+ description: 'Jira api version',
163
+ default_value: '3',
164
+ optional: true,
165
+ ),
166
+ FastlaneCore::ConfigItem.new(
167
+ key: :context_path,
168
+ env_name: 'FL_JIRA_CONTEXT_PATH',
169
+ description: 'Jira context path',
170
+ optional: true,
171
+ default_value: ''
172
+ ),
173
+ FastlaneCore::ConfigItem.new(
174
+ key: :disable_ssl_verification,
175
+ env_name: 'FL_JIRA_DISABLE_SSL_VERIFICATION',
176
+ description: 'Jira SSL Verification mode',
177
+ optional: true,
178
+ default_value: false,
179
+ type: Boolean
180
+ ),
181
+ FastlaneCore::ConfigItem.new(
182
+ key: :debug,
183
+ description: "True if you want to log out a debug info",
184
+ default_value: false,
185
+ type: Boolean,
186
+ optional: true
187
+ )
188
+ ]
189
+ end
190
+
191
+ def self.is_supported?(platform)
192
+ # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
193
+ # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
194
+ #
195
+ # [:ios, :mac, :android].include?(platform)
196
+ true
197
+ end
198
+ end
199
+ end
200
+ end