fastlane-plugin-gitlab_get_max_version_branch 0.1.1 → 0.1.2
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: a344437ac21ee58bb3d9a3ba0de31028b1364d9a7833af54b2b88f104699ed25
|
4
|
+
data.tar.gz: 042ceca66b65c9736578bc4f97d495e74831c555737ac3426c748b8ee5b192bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bd28a83d9efdce4b3c1aeccf29c83c7be9d9d45c88feba396ab82c2cff9d9d17c35ed4d21bbfec253660b523e029365f96294cb89749b3fb06847d3c9a6a36a
|
7
|
+
data.tar.gz: 9526fee0ca1b6588a7cee7a806137184cf4503a627571e71e71376588310bcaab8c86a1d0da737bf21bce60d4220ce7eac80c67ef41aa9e8cf36afdedc38642b
|
@@ -39,13 +39,34 @@ module Fastlane
|
|
39
39
|
projectid = params[:projectid]
|
40
40
|
host = params[:host]
|
41
41
|
token = params[:token]
|
42
|
+
search = params[:search]
|
42
43
|
regex = params[:regex]
|
43
44
|
|
44
45
|
gc = Gitlab.client(endpoint: host, private_token: token)
|
45
46
|
|
46
|
-
branchs =
|
47
|
-
|
47
|
+
branchs = []
|
48
|
+
page = 1
|
49
|
+
|
50
|
+
loop do
|
51
|
+
options = {}
|
52
|
+
options[:page] = page
|
53
|
+
options[:per_page] = 1000
|
54
|
+
options[:search] = search
|
55
|
+
|
56
|
+
get_branchs = gc.branches(projectid, options).map do |b|
|
57
|
+
b.name
|
58
|
+
end
|
59
|
+
break if get_branchs.empty?
|
60
|
+
|
61
|
+
page += 1
|
62
|
+
branchs += get_branchs
|
48
63
|
end
|
64
|
+
|
65
|
+
UI.important "⚠️ branchs:"
|
66
|
+
pp branchs
|
67
|
+
UI.important "⚠️ branchs.count:"
|
68
|
+
pp branchs.count
|
69
|
+
|
49
70
|
return false unless branchs
|
50
71
|
return false if branchs.empty?
|
51
72
|
|
@@ -110,6 +131,11 @@ module Fastlane
|
|
110
131
|
UI.user_error!("No regex given, pass using `regex: 'regex'`") unless value
|
111
132
|
end,
|
112
133
|
is_string: false
|
134
|
+
),
|
135
|
+
FastlaneCore::ConfigItem.new(
|
136
|
+
key: :search,
|
137
|
+
description: 'branch search regex string, like: ^master or mater$',
|
138
|
+
optional: true
|
113
139
|
)
|
114
140
|
]
|
115
141
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-gitlab_get_max_version_branch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xiongzenghui
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gitlab
|