fastlane-plugin-jira_release_notes 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d26d8c9a36e9fc6464778b2ae1284f25661b50b8ee2cd7a65266a56307038f7e
|
4
|
+
data.tar.gz: 52b9101f537ceb31e6de5d29fda379822e261725dd8745036a8f1e982c918b3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 344a6ddc7bf2e9d4014b0a08526edde8856709b6ab16c36bfdd67b6e2d97fcd669579a849ab4908513181978fad6d7e4dfb1db0b7cc36c7d9f22d938d3cf7d7d
|
7
|
+
data.tar.gz: 717a599f65dd3be2792c97a40766466f5263e8c6ba43516928e1dad63fce9280deb6b4727fa319d2ecd5a2694372e890444f6bc6f72f0cee9ea543a7124a459d
|
data/README.md
CHANGED
@@ -20,6 +20,25 @@ Release notes from JIRA for version
|
|
20
20
|
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`.
|
21
21
|
|
22
22
|
|
23
|
+
## Options
|
24
|
+
|
25
|
+
```
|
26
|
+
fastlane action jira_release_notes
|
27
|
+
```
|
28
|
+
|
29
|
+
[How to generate an API Access Token](https://confluence.atlassian.com/cloud/api-tokens-938839638.html)
|
30
|
+
|
31
|
+
Key | Description | Env Var | Default
|
32
|
+
----|-------------|---------|--------
|
33
|
+
url | URL for Jira instance | FL_JIRA_SITE |
|
34
|
+
username | Username for Jira instance | FL_JIRA_USERNAME |
|
35
|
+
password | Password for Jira or api token | FL_JIRA_PASSWORD |
|
36
|
+
project | Jira project name | FL_JIRA_PROJECT |
|
37
|
+
version | Jira project version | FL_JIRA_PROJECT_VERSION |
|
38
|
+
format | Format text. Plain, html or none | FL_JIRA_RELEASE_NOTES_FORMAT | plain
|
39
|
+
max_results | Maximum number of issues | FL_JIRA_RELEASE_NOTES_MAX_RESULTS | 50
|
40
|
+
|
41
|
+
|
23
42
|
## Run tests for this plugin
|
24
43
|
|
25
44
|
To run both the tests, and code style validation, run
|
@@ -15,6 +15,7 @@ module Fastlane
|
|
15
15
|
|
16
16
|
version = params[:version]
|
17
17
|
project = params[:project]
|
18
|
+
max_results = params[:max_results].to_i
|
18
19
|
issues = []
|
19
20
|
|
20
21
|
UI.message("Fetch issues from JIRA project '#{project}', version '#{version}'")
|
@@ -24,9 +25,11 @@ module Fastlane
|
|
24
25
|
versions = client.Project.find(project).versions
|
25
26
|
.select { |v| version.match(v.name) }
|
26
27
|
.map { |v| "'#{v.name}'" } .join(', ')
|
27
|
-
issues = client.Issue.jql("PROJECT = '#{project}' AND fixVersion in (#{versions})"
|
28
|
+
issues = client.Issue.jql("PROJECT = '#{project}' AND fixVersion in (#{versions})",
|
29
|
+
max_results: max_results)
|
28
30
|
else
|
29
|
-
issues = client.Issue.jql("PROJECT = '#{project}' AND fixVersion = '#{version}'"
|
31
|
+
issues = client.Issue.jql("PROJECT = '#{project}' AND fixVersion = '#{version}'",
|
32
|
+
max_results: max_results)
|
30
33
|
end
|
31
34
|
rescue JIRA::HTTPError => e
|
32
35
|
fields = [e.code, e.message]
|
@@ -78,7 +81,7 @@ module Fastlane
|
|
78
81
|
end),
|
79
82
|
FastlaneCore::ConfigItem.new(key: :password,
|
80
83
|
env_name: "FL_JIRA_PASSWORD",
|
81
|
-
description: "Password for Jira",
|
84
|
+
description: "Password or api token for Jira",
|
82
85
|
sensitive: true,
|
83
86
|
verify_block: proc do |value|
|
84
87
|
UI.user_error!("No password") if value.to_s.length == 0
|
@@ -103,7 +106,11 @@ module Fastlane
|
|
103
106
|
env_name: "FL_JIRA_RELEASE_NOTES_FORMAT",
|
104
107
|
description: "Format text. Plain, html or none",
|
105
108
|
sensitive: true,
|
106
|
-
default_value: "plain")
|
109
|
+
default_value: "plain"),
|
110
|
+
FastlaneCore::ConfigItem.new(key: :max_results,
|
111
|
+
env_name: "FL_JIRA_RELEASE_NOTES_MAX_RESULTS",
|
112
|
+
description: "Maximum number of issues",
|
113
|
+
default_value: "50")
|
107
114
|
]
|
108
115
|
end
|
109
116
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-jira_release_notes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Ignition
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jira-ruby
|