fastlane-plugin-jira_update 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +80 -0
- data/lib/fastlane/plugin/jira_update/actions/jira_comment_update_action.rb +169 -0
- data/lib/fastlane/plugin/jira_update/actions/jira_get_ticket.rb +118 -0
- data/lib/fastlane/plugin/jira_update/actions/jira_move_tickets_action.rb +144 -0
- data/lib/fastlane/plugin/jira_update/helper/jira_move_tickets_helper.rb +8 -0
- data/lib/fastlane/plugin/jira_update/version.rb +5 -0
- data/lib/fastlane/plugin/jira_update.rb +16 -0
- metadata +162 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: be1047099dbcbed94ee376b1e981940dfb9a4a8aba74ba4c62b71e8b62834148
|
4
|
+
data.tar.gz: fcd75278ef5b42c71c1872810fc53f11501bfa8555cc9723631bb5f1e140b5cb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: df28f102280045b2cabf9dff1003803f4c8267acc74e20284fd69b91be9ffcab603e2f1675450936cc3e10cd58219cf00747c0f819665492024142515d581175
|
7
|
+
data.tar.gz: 213c796acdce2254a258dcc7ec3812897e1c18fa297231d12eaef39e37aa720391730712b199158c3cdd9d58041714d60a4eb8a340ab4ad09b0a100f94103e84
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Flop Butylkin <flop@hackerspace.by>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
# jira_update plugin
|
2
|
+
|
3
|
+
[![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-jira_update)
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-jira_update`, add it to your project by running:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
fastlane add_plugin jira_update
|
11
|
+
```
|
12
|
+
|
13
|
+
## About jira_update
|
14
|
+
|
15
|
+
Update JIRA tickets status
|
16
|
+
|
17
|
+
|
18
|
+
## Example
|
19
|
+
|
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
|
+
|
22
|
+
```ruby
|
23
|
+
lane :notes do
|
24
|
+
result = jira_move_tickets(
|
25
|
+
username: "me",
|
26
|
+
password: "123", # password or api token
|
27
|
+
url: "https://jira.example.com",
|
28
|
+
ticket: "APP-123",
|
29
|
+
target: "ready"
|
30
|
+
)
|
31
|
+
puts result
|
32
|
+
end
|
33
|
+
```
|
34
|
+
|
35
|
+
## Options
|
36
|
+
|
37
|
+
```
|
38
|
+
fastlane action jira_move_tickets
|
39
|
+
```
|
40
|
+
|
41
|
+
[How to generate an API Access Token](https://confluence.atlassian.com/cloud/api-tokens-938839638.html)
|
42
|
+
|
43
|
+
Key | Description | Env Var | Default
|
44
|
+
----|-------------|---------|--------
|
45
|
+
url | URL for Jira instance | FL_JIRA_SITE |
|
46
|
+
username | Username for Jira instance | FL_JIRA_USERNAME |
|
47
|
+
password | Password for Jira or api token | FL_JIRA_PASSWORD |
|
48
|
+
ticket | Jira ticket to move String | FL_JIRA_TICKET |
|
49
|
+
tickets | Jira tickets to move Array of Strings | FL_JIRA_TICKETS |
|
50
|
+
target | Jira status move to | FL_JIRA_TARGET |
|
51
|
+
|
52
|
+
|
53
|
+
## Run tests for this plugin
|
54
|
+
|
55
|
+
To run both the tests, and code style validation, run
|
56
|
+
|
57
|
+
```
|
58
|
+
rake
|
59
|
+
```
|
60
|
+
|
61
|
+
To automatically fix many of the styling issues, use
|
62
|
+
```
|
63
|
+
rubocop -a
|
64
|
+
```
|
65
|
+
|
66
|
+
## Issues and Feedback
|
67
|
+
|
68
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
69
|
+
|
70
|
+
## Troubleshooting
|
71
|
+
|
72
|
+
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
73
|
+
|
74
|
+
## Using _fastlane_ Plugins
|
75
|
+
|
76
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
77
|
+
|
78
|
+
## About _fastlane_
|
79
|
+
|
80
|
+
_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,169 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class JiraCommentUpdateAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
Actions.verify_gem!('jira-ruby')
|
6
|
+
require 'jira-ruby'
|
7
|
+
|
8
|
+
client = JIRA::Client.new(
|
9
|
+
username: params[:username],
|
10
|
+
password: params[:password],
|
11
|
+
site: params[:url],
|
12
|
+
context_path: '',
|
13
|
+
auth_type: :basic
|
14
|
+
)
|
15
|
+
|
16
|
+
ticket = params[:ticket]
|
17
|
+
search = params[:comment_search]
|
18
|
+
username = params[:username]
|
19
|
+
comment = params[:comment_text]
|
20
|
+
update_comment = params[:update_comment] || false
|
21
|
+
fail_if_not_found = params[:fail_if_not_found] || false
|
22
|
+
|
23
|
+
|
24
|
+
UI.message("JIRA ticket to update: '#{ticket}'")
|
25
|
+
|
26
|
+
|
27
|
+
begin
|
28
|
+
issue = client.Issue.find(ticket)
|
29
|
+
|
30
|
+
UI.message("JIRA ticket: '#{issue.id}'")
|
31
|
+
|
32
|
+
if search
|
33
|
+
# search comment
|
34
|
+
UI.message("Searching for comment: '#{search}'")
|
35
|
+
comment_obj = issue.comments.find { |comment|
|
36
|
+
comment.body.include?(search) && comment.author['displayName'] == username
|
37
|
+
}
|
38
|
+
|
39
|
+
UI.error!("Comment not found") if fail_if_not_found && !comment_obj
|
40
|
+
UI.message("Comment found: '#{comment_obj.body}'") if comment_obj
|
41
|
+
|
42
|
+
if comment_obj && update_comment
|
43
|
+
comment_obj.save({ 'body' => comment })
|
44
|
+
UI.message("Comment updated: '#{comment_obj.body}'")
|
45
|
+
elsif comment_obj
|
46
|
+
comment_obj.delete
|
47
|
+
UI.message("Comment deleted: '#{comment_obj.body}'")
|
48
|
+
end
|
49
|
+
|
50
|
+
if !update_comment
|
51
|
+
new_comment = issue.comments.build
|
52
|
+
new_comment.save({ 'body' => comment })
|
53
|
+
UI.message("Comment added: '#{new_comment.body}'")
|
54
|
+
end
|
55
|
+
|
56
|
+
else
|
57
|
+
UI.message("No search provided, will add new comment")
|
58
|
+
new_comment = issue.comments.build
|
59
|
+
new_comment.save({ 'body' => comment })
|
60
|
+
UI.message("Comment added: '#{new_comment.body}'")
|
61
|
+
end
|
62
|
+
|
63
|
+
rescue StandardError => e
|
64
|
+
UI.important("Failed to fetch issue #{ticket}: #{e.message}")
|
65
|
+
UI.error!("Failed to fetch issue #{ticket}: #{e.message}") if fail_if_not_found
|
66
|
+
result = "Ticket not found"
|
67
|
+
end
|
68
|
+
|
69
|
+
UI.success("JIRA ticket updated: '#{issue.id}'")
|
70
|
+
|
71
|
+
return issue
|
72
|
+
end
|
73
|
+
|
74
|
+
#####################################################
|
75
|
+
# @!group Documentation
|
76
|
+
#####################################################
|
77
|
+
|
78
|
+
def self.description
|
79
|
+
"Jira ticket comment replace action"
|
80
|
+
end
|
81
|
+
|
82
|
+
def self.details
|
83
|
+
"Replace Jira ticket comment"
|
84
|
+
end
|
85
|
+
|
86
|
+
def self.return_value
|
87
|
+
"Hash where keys are Jira ticket IDs and values results of the action"
|
88
|
+
end
|
89
|
+
|
90
|
+
def self.return_type
|
91
|
+
:hash
|
92
|
+
end
|
93
|
+
|
94
|
+
def self.available_options
|
95
|
+
[
|
96
|
+
FastlaneCore::ConfigItem.new(key: :url,
|
97
|
+
env_name: "FL_JIRA_SITE",
|
98
|
+
description: "URL for Jira instance",
|
99
|
+
verify_block: proc do |value|
|
100
|
+
UI.user_error!("No url for Jira given") if value.to_s.length == 0
|
101
|
+
end),
|
102
|
+
FastlaneCore::ConfigItem.new(key: :username,
|
103
|
+
env_name: "FL_JIRA_USERNAME",
|
104
|
+
description: "Username for Jira instance",
|
105
|
+
verify_block: proc do |value|
|
106
|
+
UI.user_error!("No username") if value.to_s.length == 0
|
107
|
+
end),
|
108
|
+
FastlaneCore::ConfigItem.new(key: :password,
|
109
|
+
env_name: "FL_JIRA_PASSWORD",
|
110
|
+
description: "Password or api token for Jira",
|
111
|
+
sensitive: true,
|
112
|
+
verify_block: proc do |value|
|
113
|
+
UI.user_error!("No password") if value.to_s.length == 0
|
114
|
+
end),
|
115
|
+
FastlaneCore::ConfigItem.new(key: :ticket,
|
116
|
+
env_name: "FL_JIRA_TICKET",
|
117
|
+
description: "Jira ticket id",
|
118
|
+
type: String,
|
119
|
+
optional: true,
|
120
|
+
default_value: nil),
|
121
|
+
FastlaneCore::ConfigItem.new(key: :comment_search,
|
122
|
+
description: "Jira comment text to find",
|
123
|
+
type: String,
|
124
|
+
optional: true,
|
125
|
+
default_value: nil),
|
126
|
+
FastlaneCore::ConfigItem.new(key: :comment_text,
|
127
|
+
description: "Jira comment text to add",
|
128
|
+
type: String,
|
129
|
+
default_value: "comment"),
|
130
|
+
FastlaneCore::ConfigItem.new(key: :fail_if_not_found,
|
131
|
+
description: "Fail if Issue or comment not found",
|
132
|
+
type: Boolean,
|
133
|
+
default_value: false),
|
134
|
+
FastlaneCore::ConfigItem.new(key: :update_comment,
|
135
|
+
description: "Update comment if found otherwise will delete and add new comment",
|
136
|
+
type: Boolean,
|
137
|
+
default_value: false)
|
138
|
+
]
|
139
|
+
end
|
140
|
+
|
141
|
+
def self.authors
|
142
|
+
["Flop Butylkin"]
|
143
|
+
end
|
144
|
+
|
145
|
+
def self.is_supported?(platform)
|
146
|
+
true
|
147
|
+
end
|
148
|
+
|
149
|
+
def self.example_code
|
150
|
+
[
|
151
|
+
'
|
152
|
+
gym
|
153
|
+
slack(message: "Done")
|
154
|
+
jira_comment_update(
|
155
|
+
ticket: "APP-132",
|
156
|
+
search: "Test comment",
|
157
|
+
comment: "Test comment updated",
|
158
|
+
update_comment: true
|
159
|
+
)
|
160
|
+
'
|
161
|
+
]
|
162
|
+
end
|
163
|
+
|
164
|
+
def self.category
|
165
|
+
:misc
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
@@ -0,0 +1,118 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class JiraGetTicketAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
Actions.verify_gem!('jira-ruby')
|
6
|
+
require 'jira-ruby'
|
7
|
+
|
8
|
+
client = JIRA::Client.new(
|
9
|
+
username: params[:username],
|
10
|
+
password: params[:password],
|
11
|
+
site: params[:url],
|
12
|
+
context_path: '',
|
13
|
+
auth_type: :basic
|
14
|
+
)
|
15
|
+
|
16
|
+
ticket = params[:ticket]
|
17
|
+
UI.message("JIRA ticket id: '#{ticket}'")
|
18
|
+
|
19
|
+
begin
|
20
|
+
issue = client.Issue.find(ticket)
|
21
|
+
|
22
|
+
rescue StandardError => e
|
23
|
+
UI.important("Failed to fetch issue #{ticket}: #{e.message}")
|
24
|
+
UI.error!("Failed to fetch issue #{ticket}: #{e.message}") if fail_if_not_found
|
25
|
+
result = "Ticket not found"
|
26
|
+
end
|
27
|
+
|
28
|
+
# Convert the issue to a hash only with the fields we need
|
29
|
+
issue_hash = {
|
30
|
+
id: issue.id,
|
31
|
+
key: issue.key,
|
32
|
+
summary: issue.summary,
|
33
|
+
description: issue.description,
|
34
|
+
status: issue.status.name,
|
35
|
+
assignee: issue.assignee.displayName,
|
36
|
+
reporter: issue.reporter.displayName,
|
37
|
+
created: issue.created,
|
38
|
+
updated: issue.updated
|
39
|
+
}
|
40
|
+
|
41
|
+
UI.message("JIRA ticket found: '#{issue_hash[:key]}'")
|
42
|
+
return issue_hash
|
43
|
+
end
|
44
|
+
|
45
|
+
#####################################################
|
46
|
+
# @!group Documentation
|
47
|
+
#####################################################
|
48
|
+
|
49
|
+
def self.description
|
50
|
+
"Jira ticket comment replace action"
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.details
|
54
|
+
"Replace Jira ticket comment"
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.return_value
|
58
|
+
"Hash where keys are Jira ticket IDs and values results of the action"
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.return_type
|
62
|
+
:hash
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.available_options
|
66
|
+
[
|
67
|
+
FastlaneCore::ConfigItem.new(key: :url,
|
68
|
+
env_name: "FL_JIRA_SITE",
|
69
|
+
description: "URL for Jira instance",
|
70
|
+
verify_block: proc do |value|
|
71
|
+
UI.user_error!("No url for Jira given") if value.to_s.length == 0
|
72
|
+
end),
|
73
|
+
FastlaneCore::ConfigItem.new(key: :username,
|
74
|
+
env_name: "FL_JIRA_USERNAME",
|
75
|
+
description: "Username for Jira instance",
|
76
|
+
verify_block: proc do |value|
|
77
|
+
UI.user_error!("No username") if value.to_s.length == 0
|
78
|
+
end),
|
79
|
+
FastlaneCore::ConfigItem.new(key: :password,
|
80
|
+
env_name: "FL_JIRA_PASSWORD",
|
81
|
+
description: "Password or api token for Jira",
|
82
|
+
sensitive: true,
|
83
|
+
verify_block: proc do |value|
|
84
|
+
UI.user_error!("No password") if value.to_s.length == 0
|
85
|
+
end),
|
86
|
+
FastlaneCore::ConfigItem.new(key: :ticket,
|
87
|
+
env_name: "FL_JIRA_TICKET",
|
88
|
+
description: "Jira ticket id",
|
89
|
+
type: String,
|
90
|
+
optional: true,
|
91
|
+
default_value: nil)
|
92
|
+
]
|
93
|
+
end
|
94
|
+
|
95
|
+
def self.authors
|
96
|
+
["Flop Butylkin"]
|
97
|
+
end
|
98
|
+
|
99
|
+
def self.is_supported?(platform)
|
100
|
+
true
|
101
|
+
end
|
102
|
+
|
103
|
+
def self.example_code
|
104
|
+
[
|
105
|
+
'
|
106
|
+
jira_get_ticket(
|
107
|
+
ticket: "APP-132",
|
108
|
+
)
|
109
|
+
'
|
110
|
+
]
|
111
|
+
end
|
112
|
+
|
113
|
+
def self.category
|
114
|
+
:misc
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
@@ -0,0 +1,144 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class JiraMoveTicketsAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
Actions.verify_gem!('jira-ruby')
|
6
|
+
require 'jira-ruby'
|
7
|
+
|
8
|
+
client = JIRA::Client.new(
|
9
|
+
username: params[:username],
|
10
|
+
password: params[:password],
|
11
|
+
site: params[:url],
|
12
|
+
context_path: '',
|
13
|
+
auth_type: :basic
|
14
|
+
)
|
15
|
+
|
16
|
+
issues = {}
|
17
|
+
issues[params[:ticket]] = "" if params[:ticket]
|
18
|
+
params[:tickets].each { |ticket| issues[ticket] = "" } if params[:tickets]
|
19
|
+
target = params[:target]
|
20
|
+
|
21
|
+
UI.message("JIRA tickets to move: '#{issues.keys}' to '#{target}'")
|
22
|
+
|
23
|
+
|
24
|
+
issues.each_key do |ticket|
|
25
|
+
# puts "Moving ticket #{ticket}"
|
26
|
+
result = ""
|
27
|
+
begin
|
28
|
+
issue = client.Issue.find(ticket)
|
29
|
+
|
30
|
+
transition = issue.transitions.build
|
31
|
+
available_transitions = issue.transitions.all.map { |t| { id: t.id, name: t.name } }
|
32
|
+
# puts "Available transitions: #{available_transitions}"
|
33
|
+
target_transition = available_transitions.find { |t| t[:name].casecmp(target).zero? }
|
34
|
+
if target_transition
|
35
|
+
transition.save!("transition" => { "id" => target_transition[:id] })
|
36
|
+
result = "Success '#{target}'"
|
37
|
+
else
|
38
|
+
result = "Can't move to '#{target}'"
|
39
|
+
end
|
40
|
+
|
41
|
+
rescue StandardError => e
|
42
|
+
UI.important("Failed to fetch issue #{ticket}: #{e.message}")
|
43
|
+
result = "Ticket not found"
|
44
|
+
end
|
45
|
+
issues[ticket] = result
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
UI.message("JIRA tickets updated: '#{issues}'")
|
50
|
+
|
51
|
+
return issues
|
52
|
+
end
|
53
|
+
|
54
|
+
#####################################################
|
55
|
+
# @!group Documentation
|
56
|
+
#####################################################
|
57
|
+
|
58
|
+
def self.description
|
59
|
+
"Jira update actions"
|
60
|
+
end
|
61
|
+
|
62
|
+
def self.details
|
63
|
+
"Update Jira tickets"
|
64
|
+
end
|
65
|
+
|
66
|
+
def self.return_value
|
67
|
+
"Hash where keys are Jira ticket IDs and values results of the action"
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.return_type
|
71
|
+
:hash
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.available_options
|
75
|
+
[
|
76
|
+
FastlaneCore::ConfigItem.new(key: :url,
|
77
|
+
env_name: "FL_JIRA_SITE",
|
78
|
+
description: "URL for Jira instance",
|
79
|
+
verify_block: proc do |value|
|
80
|
+
UI.user_error!("No url for Jira given") if value.to_s.length == 0
|
81
|
+
end),
|
82
|
+
FastlaneCore::ConfigItem.new(key: :username,
|
83
|
+
env_name: "FL_JIRA_USERNAME",
|
84
|
+
description: "Username for Jira instance",
|
85
|
+
verify_block: proc do |value|
|
86
|
+
UI.user_error!("No username") if value.to_s.length == 0
|
87
|
+
end),
|
88
|
+
FastlaneCore::ConfigItem.new(key: :password,
|
89
|
+
env_name: "FL_JIRA_PASSWORD",
|
90
|
+
description: "Password or api token for Jira",
|
91
|
+
sensitive: true,
|
92
|
+
verify_block: proc do |value|
|
93
|
+
UI.user_error!("No password") if value.to_s.length == 0
|
94
|
+
end),
|
95
|
+
FastlaneCore::ConfigItem.new(key: :ticket,
|
96
|
+
env_name: "FL_JIRA_TICKET",
|
97
|
+
description: "Jira ticket id",
|
98
|
+
type: String,
|
99
|
+
optional: true,
|
100
|
+
default_value: nil),
|
101
|
+
FastlaneCore::ConfigItem.new(key: :tickets,
|
102
|
+
env_name: "FL_JIRA_TICKETS",
|
103
|
+
description: "Jira tickets ids array",
|
104
|
+
type: Array,
|
105
|
+
optional: true,
|
106
|
+
default_value: nil),
|
107
|
+
FastlaneCore::ConfigItem.new(key: :target,
|
108
|
+
env_name: "FL_JIRA_TARGET",
|
109
|
+
description: "Target status for Jira tickets",
|
110
|
+
type: String,
|
111
|
+
default_value: "Closed")
|
112
|
+
]
|
113
|
+
end
|
114
|
+
|
115
|
+
def self.authors
|
116
|
+
["Flop Butylkin"]
|
117
|
+
end
|
118
|
+
|
119
|
+
def self.is_supported?(platform)
|
120
|
+
true
|
121
|
+
end
|
122
|
+
|
123
|
+
def self.example_code
|
124
|
+
[
|
125
|
+
'
|
126
|
+
gym
|
127
|
+
slack(message: "Done")
|
128
|
+
jira_move_tickets(
|
129
|
+
url: "https://jira.yourdomain.com",
|
130
|
+
username: "Username",
|
131
|
+
password: "Password",
|
132
|
+
ticket: "ABC-123",
|
133
|
+
target: "Done"
|
134
|
+
)
|
135
|
+
'
|
136
|
+
]
|
137
|
+
end
|
138
|
+
|
139
|
+
def self.category
|
140
|
+
:misc
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fastlane/plugin/jira_update/version'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module JiraUpdate
|
5
|
+
# Return all .rb files inside the "actions" and "helper" directory
|
6
|
+
def self.all_classes
|
7
|
+
Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# By default we want to import all available actions and helpers
|
13
|
+
# A plugin can contain any number of actions and plugins
|
14
|
+
Fastlane::JiraUpdate.all_classes.each do |current|
|
15
|
+
require current
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,162 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-jira_update
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Flop Butylkin
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-07-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jira-ruby
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.3.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.3.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: fastlane
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 2.49.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 2.49.0
|
125
|
+
description:
|
126
|
+
email: flopspm@gmail.com
|
127
|
+
executables: []
|
128
|
+
extensions: []
|
129
|
+
extra_rdoc_files: []
|
130
|
+
files:
|
131
|
+
- LICENSE
|
132
|
+
- README.md
|
133
|
+
- lib/fastlane/plugin/jira_update.rb
|
134
|
+
- lib/fastlane/plugin/jira_update/actions/jira_comment_update_action.rb
|
135
|
+
- lib/fastlane/plugin/jira_update/actions/jira_get_ticket.rb
|
136
|
+
- lib/fastlane/plugin/jira_update/actions/jira_move_tickets_action.rb
|
137
|
+
- lib/fastlane/plugin/jira_update/helper/jira_move_tickets_helper.rb
|
138
|
+
- lib/fastlane/plugin/jira_update/version.rb
|
139
|
+
homepage: https://github.com/
|
140
|
+
licenses:
|
141
|
+
- MIT
|
142
|
+
metadata: {}
|
143
|
+
post_install_message:
|
144
|
+
rdoc_options: []
|
145
|
+
require_paths:
|
146
|
+
- lib
|
147
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - ">="
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '0'
|
157
|
+
requirements: []
|
158
|
+
rubygems_version: 3.3.3
|
159
|
+
signing_key:
|
160
|
+
specification_version: 4
|
161
|
+
summary: JIRA update actions
|
162
|
+
test_files: []
|