fastlane-plugin-jira_issues_release_notes 0.2.0 → 0.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46ef2b8077756b097e6e29a717353e98cd96b4ec0db8b9d18277bb3fbbd76904
|
4
|
+
data.tar.gz: 8e2992d121e59aa11dd08ab1aaaf0a473fa0c1c0d8d4dc347ac2a3632582bd58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e86cf49c8a4610b8c3f77d011e288b243bf4f3d0cfe6c2dead06cce6f0d961807de8e25eb89fd0a81b81239ae8c1bac56b2d43b74a03206597e3a45639435ae
|
7
|
+
data.tar.gz: 1ec2acb7fef93be929f03438bc09dbfd6de7f95687b429e36b595c160b9ed1ad79d271d6f1b653cb010c681733bf3c953ec948321e14e002cecfaf739e38af62
|
data/README.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
-
#
|
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
4
|
|
5
|
+
|
6
|
+
|
5
7
|
## Getting Started
|
6
8
|
|
7
9
|
This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-jira_issues_release_notes`, add it to your project by running:
|
@@ -10,17 +12,127 @@ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To
|
|
10
12
|
fastlane add_plugin jira_issues_release_notes
|
11
13
|
```
|
12
14
|
|
15
|
+
|
16
|
+
|
13
17
|
## About jira_issues_release_notes
|
14
18
|
|
15
|
-
It generates a release note based on the issues keys and descriptions found in the commits
|
19
|
+
It generates a release note based on the issues keys and descriptions found in the commits.
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
## Actions
|
24
|
+
|
25
|
+
All actions requires some parameter 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
|
+
|
36
|
+
|
37
|
+
|
38
|
+
### branch_jira_issues_release_notes
|
39
|
+
|
40
|
+
This action creates a changelog based on the issue key extracted from your branch name. For exemple a branch called `feature/ABC-1234-some-feature` will extract to `ABC-1234` issue key.
|
41
|
+
|
42
|
+
It should be used to generate version to validate you branch's feature before it be merged.
|
43
|
+
|
44
|
+
**Arguments:**
|
45
|
+
|
46
|
+
| Argument | Type | Description | Optional | Default | Env Name |
|
47
|
+
| ------------- | ------------------------------ | ------------------------------------------------------------ | -------- | -------------------- | -------------------------- |
|
48
|
+
| ticket_prefix | `String` or `Regex` | The prefix for yours jira issues | ✓ | `[A_Z]+` | `FL_FIND_TICKETS_MATCHING` |
|
49
|
+
| 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 />`{}` | |
|
50
|
+
| format | `slack`, `markdown` or `plain` | Defines the result format | ✓ | `markdown` | |
|
51
|
+
|
52
|
+
**Usage example:**
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
# Branch: feature/ABC-1234-some-feature
|
56
|
+
|
57
|
+
platform :android do
|
58
|
+
lane :develop do
|
59
|
+
# Build a apk for development environment
|
60
|
+
build_develop
|
61
|
+
link_to_download = upload_to_s3
|
62
|
+
|
63
|
+
release_notes = branch_jira_issues_release_notes(
|
64
|
+
ticket_prefix: 'ABC',
|
65
|
+
username: ENV["FL_JIRA_USERNAME"],
|
66
|
+
password: ENV["FL_JIRA_PASSWORD"],
|
67
|
+
host: ENV["FL_JIRA_HOST"],
|
68
|
+
format: 'slack',
|
69
|
+
extra_fields: {
|
70
|
+
"What should we test?" => :customfield_1
|
71
|
+
}
|
72
|
+
)
|
16
73
|
|
17
|
-
|
74
|
+
slack(
|
75
|
+
pretext: ":android: A new android build is available for feature validation\n#{release_notes}",
|
76
|
+
payload: {
|
77
|
+
"Donwload it here" => link_to_download
|
78
|
+
},
|
79
|
+
success: true
|
80
|
+
)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
```
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
### jira_issues_release_notes
|
88
|
+
|
89
|
+
This action creates a changelog based on the issue keys extracted from your commits since the latest published tag.
|
90
|
+
|
91
|
+
It should be used to generate version to validate in QA stage.
|
92
|
+
|
93
|
+
**Usage example:**
|
94
|
+
|
95
|
+
```ruby
|
96
|
+
platform :android do
|
97
|
+
lane :develop do
|
98
|
+
# Build a apk for staging environment
|
99
|
+
build_staging
|
100
|
+
link_to_download = upload_to_s3
|
101
|
+
|
102
|
+
release_notes = jira_issues_release_notes(
|
103
|
+
tag_prefix: 'Release/Android/v*',
|
104
|
+
ticket_prefix: 'ABC',
|
105
|
+
username: ENV["FL_JIRA_USERNAME"],
|
106
|
+
password: ENV["FL_JIRA_PASSWORD"],
|
107
|
+
host: ENV["FL_JIRA_HOST"],
|
108
|
+
validated_status: ['To Deploy', 'Done'],
|
109
|
+
to_validate_status: ['To Test', 'To QA'],
|
110
|
+
format: 'slack',
|
111
|
+
)
|
112
|
+
|
113
|
+
slack(
|
114
|
+
pretext: ":android: A new android build is available for QA\n#{release_notes}",
|
115
|
+
payload: {
|
116
|
+
"Donwload it here" => link_to_download
|
117
|
+
},
|
118
|
+
success: true
|
119
|
+
)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
```
|
123
|
+
|
124
|
+
**Arguments:**
|
18
125
|
|
19
|
-
|
126
|
+
| Argument | Type | Description | Optional | Default | Env Name |
|
127
|
+
| ------------------ | ------------------------------ | ---------------------------------------------------------- | -------- | ----------------- | -------------------------- |
|
128
|
+
| tag_prefix | `Regex` | Match prefix to find latest tag. Example: `release/ios/v*` | | | |
|
129
|
+
| ticket_prefix | `String` or `Regex` | The prefix for yours jira issues | ✓ | `[A_Z]+` | `FL_FIND_TICKETS_MATCHING` |
|
130
|
+
| tag_version_match | `String` | To parse version number from tag name | ✓ | `/\d+\.\d+\.\d+/` | |
|
131
|
+
| validated_status | `Array` | List of jira issues status already validated | | | FL_JIRA_VALIDATED_STATUS |
|
132
|
+
| to_validate_status | `Array` | List of jira issues status to be validated | | | FL_JIRA_TO_VALIDATE_STATUS |
|
133
|
+
| format | `slack`, `markdown` or `plain` | Defines the result format | ✓ | `markdown` | |
|
20
134
|
|
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
135
|
|
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
136
|
|
25
137
|
## Run tests for this plugin
|
26
138
|
|
@@ -35,18 +147,26 @@ To automatically fix many of the styling issues, use
|
|
35
147
|
rubocop -a
|
36
148
|
```
|
37
149
|
|
150
|
+
|
151
|
+
|
38
152
|
## Issues and Feedback
|
39
153
|
|
40
154
|
For any other issues and feedback about this plugin, please submit it to this repository.
|
41
155
|
|
156
|
+
|
157
|
+
|
42
158
|
## Troubleshooting
|
43
159
|
|
44
160
|
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
45
161
|
|
162
|
+
|
163
|
+
|
46
164
|
## Using _fastlane_ Plugins
|
47
165
|
|
48
166
|
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
49
167
|
|
168
|
+
|
169
|
+
|
50
170
|
## About _fastlane_
|
51
171
|
|
52
172
|
_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).
|
@@ -31,34 +31,6 @@ module Fastlane
|
|
31
31
|
return ticket_not_found ticket_code unless issue
|
32
32
|
|
33
33
|
generate_message_with(issue: issue)
|
34
|
-
|
35
|
-
# tickets = tickets(commits: commits, regex: regex)
|
36
|
-
# UI.important("Jira tickets: #{tickets}")
|
37
|
-
|
38
|
-
# @jira_helper = Helper::JiraIssuesReleaseNotesHelper.jira_helper(
|
39
|
-
# host: params[:host],
|
40
|
-
# username: params[:username],
|
41
|
-
# password: params[:password],
|
42
|
-
# context_path: params[:context_path],
|
43
|
-
# disable_ssl_verification: params[:disable_ssl_verification]
|
44
|
-
# )
|
45
|
-
# issues = @jira_helper.get(issues: tickets)
|
46
|
-
|
47
|
-
# to_validate = issues.select { |issue| params[:to_validate_status].include?(issue.status.name) }
|
48
|
-
# validated = issues.select { |issue| params[:validated_status].include?(issue.status.name) }
|
49
|
-
|
50
|
-
# generate_changelog(to_validate: to_validate, validated: validated, format: params[:format], url: params[:build_url])
|
51
|
-
# end
|
52
|
-
|
53
|
-
# def self.generate_changelog(to_validate:, validated:, format:, url:)
|
54
|
-
# changelog = []
|
55
|
-
# changelog.concat(format_issues(label: 'Tasks to validate', issues: to_validate, format: format)) unless to_validate.empty?
|
56
|
-
# changelog.concat(['']) unless changelog.to_s.empty?
|
57
|
-
# changelog.concat(format_issues(label: 'Validated tasks', issues: validated, format: format)) unless validated.empty?
|
58
|
-
# # changes = format_issues(issues: issues)
|
59
|
-
# changelog = ['No changes included.'] if changelog.to_s.empty?
|
60
|
-
|
61
|
-
# changelog.join("\n")
|
62
34
|
end
|
63
35
|
|
64
36
|
def self.ticket_not_found(ticket_code = "")
|
@@ -175,13 +147,6 @@ module Fastlane
|
|
175
147
|
default_value: '[A-Z]+',
|
176
148
|
optional: true
|
177
149
|
),
|
178
|
-
FastlaneCore::ConfigItem.new(
|
179
|
-
key: :build_url,
|
180
|
-
env_name: 'FL_RELEASE_NOTES_BUILD_URL',
|
181
|
-
description: 'Link to the ci build',
|
182
|
-
optional: true,
|
183
|
-
default_value: ENV['BUILD_URL']
|
184
|
-
),
|
185
150
|
FastlaneCore::ConfigItem.new(
|
186
151
|
key: :format,
|
187
152
|
description: "You can use either markdown, slack or plain",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-jira_issues_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
|
- Erick Martins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jira-ruby
|