fastlane-plugin-jira_versions 0.1.0 → 0.1.1

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
- SHA1:
3
- metadata.gz: 33da91cd26f04c07ab486ee97746da815a11069c
4
- data.tar.gz: 41d7079efec23a1dbc669045b5c8a253c92a07fc
2
+ SHA256:
3
+ metadata.gz: b04306f576e7246a39d6819a4865d8bba77c381773e94913a25d7e34d0d32eec
4
+ data.tar.gz: 506cfc9ef7fbfee974885c0c56f038a44503536660a8b4d4937c22e2e19fb009
5
5
  SHA512:
6
- metadata.gz: ae25ab47a6a5cd5e730361b7b2d2af91495c567bc0b9192f90afb72dcf37a88226633ad39bd1d498fb0ea62086be2268efe4eea9301360a0b25c3d8f5a8ab064
7
- data.tar.gz: 9913ead2679d7c52670cb6f7f033b9cfc3d695d696ef43f9e3959aa490c9c5c196e420c00068dc2495ab38f32710a2521a049d761119e0c9b9df1bf39b4f9640
6
+ metadata.gz: fc9eda20a24ab422fef0e64c5ac96c95d3440526399fb70b60a39b1f835e0bf403c76ab5f76aa6fbdd8e80a890db0d8d8cd1f08650dd583d9076ddd7a0d2db83
7
+ data.tar.gz: 86af668034ab40bd3c13f6ac3fcf34faf56acb15669250829cb3e6a2aa9beba6f231abeca26bcb57177ceac489445654d27c958c43a25b38bd1f63c327bf37c9
@@ -21,6 +21,7 @@ module Fastlane
21
21
  archived = params[:archived]
22
22
  released = params[:released]
23
23
  start_date = params[:start_date]
24
+ use_ssl = params[:use_ssl]
24
25
 
25
26
  options = {
26
27
  username: username,
@@ -28,6 +29,7 @@ module Fastlane
28
29
  site: site,
29
30
  context_path: context_path,
30
31
  auth_type: auth_type,
32
+ use_ssl: use_ssl,
31
33
  read_timeout: 120
32
34
  }
33
35
 
@@ -147,7 +149,13 @@ module Fastlane
147
149
  type: String,
148
150
  is_string: true,
149
151
  optional: true,
150
- default_value: Date.today.to_s)
152
+ default_value: Date.today.to_s),
153
+ FastlaneCore::ConfigItem.new(key: :use_ssl,
154
+ env_name: "FL_CREATE_JIRA_VERSION_USE_SSL",
155
+ description: "If true communication with jira will be done by using https",
156
+ is_string: false,
157
+ optional: true,
158
+ default_value: true)
151
159
  ]
152
160
  end
153
161
 
@@ -0,0 +1,129 @@
1
+ module Fastlane
2
+ module Actions
3
+ module SharedValues
4
+ GET_JIRA_VERSION_NAMES = :GET_JIRA_VERSION_NAMES
5
+ end
6
+
7
+ class GetJiraVersionsAction < Action
8
+ def self.run(params)
9
+ Actions.verify_gem!('jira-ruby')
10
+ require 'jira-ruby'
11
+
12
+ site = params[:url]
13
+ context_path = ""
14
+ auth_type = :basic
15
+ username = params[:username]
16
+ password = params[:password]
17
+ project_name = params[:project_name]
18
+ project_id = params[:project_id]
19
+ use_ssl = params[:use_ssl]
20
+
21
+ options = {
22
+ username: username,
23
+ password: password,
24
+ site: site,
25
+ context_path: context_path,
26
+ auth_type: auth_type,
27
+ use_ssl: use_ssl,
28
+ read_timeout: 120
29
+ }
30
+
31
+ client = JIRA::Client.new(options)
32
+
33
+ unless project_name.nil?
34
+ project = client.Project.find(project_name)
35
+ end
36
+
37
+ version_names = project.versions.map { |version| version.name }
38
+ Actions.lane_context[SharedValues::GET_JIRA_VERSION_NAMES] = version_names
39
+ return version_names
40
+ end
41
+
42
+ #####################################################
43
+ # @!group Documentation
44
+ #####################################################
45
+
46
+ def self.description
47
+ "Gets a list of all versions for a JIRA project"
48
+ end
49
+
50
+ def self.details
51
+ "Use this action to get a list of all version names for a JIRA project"
52
+ end
53
+
54
+ def self.available_options
55
+ [
56
+ FastlaneCore::ConfigItem.new(key: :url,
57
+ env_name: "FL_GET_JIRA_VERSIONS_SITE",
58
+ description: "URL for Jira instance",
59
+ type: String,
60
+ verify_block: proc do |value|
61
+ UI.user_error!("No url for Jira given, pass using `url: 'url'`") unless value and !value.empty?
62
+ end),
63
+ FastlaneCore::ConfigItem.new(key: :username,
64
+ env_name: "FL_GET_JIRA_VERSIONS_USERNAME",
65
+ description: "Username for JIRA instance",
66
+ type: String,
67
+ verify_block: proc do |value|
68
+ UI.user_error!("No username given, pass using `username: 'jira_user'`") unless value and !value.empty?
69
+ end),
70
+ FastlaneCore::ConfigItem.new(key: :password,
71
+ env_name: "FL_GET_JIRA_VERSIONS_PASSWORD",
72
+ description: "Password for Jira",
73
+ type: String,
74
+ verify_block: proc do |value|
75
+ UI.user_error!("No password given, pass using `password: 'T0PS3CR3T'`") unless value and !value.empty?
76
+ end),
77
+ FastlaneCore::ConfigItem.new(key: :project_name,
78
+ env_name: "FL_GET_JIRA_VERSIONS_PROJECT_NAME",
79
+ description: "Project ID for the JIRA project. E.g. the short abbreviation in the JIRA ticket tags",
80
+ type: String,
81
+ optional: true,
82
+ conflicting_options: [:project_id],
83
+ conflict_block: proc do |value|
84
+ UI.user_error!("You can't use 'project_name' and '#{project_id}' options in one run")
85
+ end,
86
+ verify_block: proc do |value|
87
+ UI.user_error!("No Project ID given, pass using `project_id: 'PROJID'`") unless value and !value.empty?
88
+ end),
89
+ FastlaneCore::ConfigItem.new(key: :project_id,
90
+ env_name: "FL_GET_JIRA_VERSIONS_PROJECT_ID",
91
+ description: "Project ID for the JIRA project. E.g. the short abbreviation in the JIRA ticket tags",
92
+ type: String,
93
+ optional: true,
94
+ conflicting_options: [:project_name],
95
+ conflict_block: proc do |value|
96
+ UI.user_error!("You can't use 'project_id' and '#{project_name}' options in one run")
97
+ end,
98
+ verify_block: proc do |value|
99
+ UI.user_error!("No Project ID given, pass using `project_id: 'PROJID'`") unless value and !value.empty?
100
+ end),
101
+ FastlaneCore::ConfigItem.new(key: :use_ssl,
102
+ env_name: "FL_GET_JIRA_VERSIONS_USE_SSL",
103
+ description: "If true communication with jira will be done by using https",
104
+ is_string: false,
105
+ optional: true,
106
+ default_value: true)
107
+ ]
108
+ end
109
+
110
+ def self.output
111
+ [
112
+ ['GET_JIRA_VERSION_NAMES', 'A collection of all available version names for the given project']
113
+ ]
114
+ end
115
+
116
+ def self.return_value
117
+ 'A collection of all available version names for the given project'
118
+ end
119
+
120
+ def self.authors
121
+ ["Sascha Held"]
122
+ end
123
+
124
+ def self.is_supported?(platform)
125
+ true
126
+ end
127
+ end
128
+ end
129
+ end
@@ -18,6 +18,7 @@ module Fastlane
18
18
  project_id = params[:project_id]
19
19
  name = params[:name]
20
20
  release_date = params[:release_date]
21
+ use_ssl = params[:use_ssl]
21
22
  released = true
22
23
 
23
24
  options = {
@@ -26,6 +27,7 @@ module Fastlane
26
27
  site: site,
27
28
  context_path: context_path,
28
29
  auth_type: auth_type,
30
+ use_ssl: use_ssl,
29
31
  read_timeout: 120
30
32
  }
31
33
 
@@ -129,7 +131,13 @@ module Fastlane
129
131
  type: String,
130
132
  is_string: true,
131
133
  optional: true,
132
- default_value: Date.today.to_s)
134
+ default_value: Date.today.to_s),
135
+ FastlaneCore::ConfigItem.new(key: :use_ssl,
136
+ env_name: "FL_CREATE_JIRA_VERSION_USE_SSL",
137
+ description: "If true communication with jira will be done by using https",
138
+ is_string: false,
139
+ optional: true,
140
+ default_value: true)
133
141
  ]
134
142
  end
135
143
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module JiraVersions
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-jira_versions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandy Chapman
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-02 00:00:00.000000000 Z
11
+ date: 2021-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jira-ruby
@@ -108,7 +108,7 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: 1.102.0
111
- description:
111
+ description:
112
112
  email: sandychapman@gmail.com
113
113
  executables: []
114
114
  extensions: []
@@ -118,6 +118,7 @@ files:
118
118
  - README.md
119
119
  - lib/fastlane/plugin/jira_versions.rb
120
120
  - lib/fastlane/plugin/jira_versions/actions/create_jira_version.rb
121
+ - lib/fastlane/plugin/jira_versions/actions/get_jira_versions.rb
121
122
  - lib/fastlane/plugin/jira_versions/actions/release_jira_version.rb
122
123
  - lib/fastlane/plugin/jira_versions/helper/jira_versions_helper.rb
123
124
  - lib/fastlane/plugin/jira_versions/version.rb
@@ -125,7 +126,7 @@ homepage: https://github.com/SandyChapman/fastlane-plugin-jira_versions
125
126
  licenses:
126
127
  - MIT
127
128
  metadata: {}
128
- post_install_message:
129
+ post_install_message:
129
130
  rdoc_options: []
130
131
  require_paths:
131
132
  - lib
@@ -140,9 +141,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
141
  - !ruby/object:Gem::Version
141
142
  version: '0'
142
143
  requirements: []
143
- rubyforge_project:
144
- rubygems_version: 2.5.1
145
- signing_key:
144
+ rubygems_version: 3.2.3
145
+ signing_key:
146
146
  specification_version: 4
147
147
  summary: Manage your JIRA project's releases/versions with this plugin.
148
148
  test_files: []