gitlabci-bundle-update-mr 1.1.0 → 1.1.1.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +7 -1
- data/Gemfile.lock +42 -39
- data/README.md +5 -1
- data/lib/gitlabci/bundle/update/mr/client.rb +18 -1
- data/lib/gitlabci/bundle/update/mr/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 229a9fbae1ea6840f3f383b08cc83a15ff50d28739f06dfd5987564424ae7ab2
|
4
|
+
data.tar.gz: 677df6d813f5b0609e336323496c23c9a789c2fc5dfdcff31cb3095f57057c90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 294bd4ec7d61cbf932e168386463eed2428f846e96e92959a44f4380e9f6640e98d75b8f17c0a8217a4be42401adebb57dd7bb623ceb81e4fd52e6cdb3aba329
|
7
|
+
data.tar.gz: 53be10193139b5fc00e3a4f228362b60ebf3a83c9565737307c442047855fd18faad20085a81a3a314313a64a985af3aafd6799842ccd160ed3f43d673315ce7
|
data/.gitlab-ci.yml
CHANGED
@@ -30,7 +30,8 @@ continuous_bundle_update:
|
|
30
30
|
- vendor/bundle/
|
31
31
|
|
32
32
|
before_script:
|
33
|
-
- bundle
|
33
|
+
- bundle config --local path 'vendor/bundle'
|
34
|
+
- bundle install --retry=3 --jobs=$(nproc)
|
34
35
|
- bundle clean
|
35
36
|
|
36
37
|
except:
|
@@ -62,6 +63,11 @@ test:2.7:
|
|
62
63
|
|
63
64
|
image: ruby:2.7
|
64
65
|
|
66
|
+
test:3.0:
|
67
|
+
extends: .test
|
68
|
+
|
69
|
+
image: ruby:3.0
|
70
|
+
|
65
71
|
test:trunk:
|
66
72
|
extends: .test
|
67
73
|
|
data/Gemfile.lock
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
GIT
|
2
2
|
remote: https://github.com/sue445/onkcop.git
|
3
|
-
revision:
|
3
|
+
revision: d09f75a5eeb1969800cca160f653325771590fae
|
4
4
|
branch: develop
|
5
5
|
specs:
|
6
6
|
onkcop (0.53.0.3)
|
7
7
|
rubocop (>= 0.53.0)
|
8
|
-
rubocop-rspec (>= 1.
|
8
|
+
rubocop-rspec (>= 1.34.0)
|
9
9
|
|
10
10
|
PATH
|
11
11
|
remote: .
|
12
12
|
specs:
|
13
|
-
gitlabci-bundle-update-mr (1.1.
|
13
|
+
gitlabci-bundle-update-mr (1.1.1.beta1)
|
14
14
|
bundler
|
15
15
|
compare_linker (>= 1.4.3)
|
16
16
|
gitlab (>= 4.14.1)
|
@@ -27,16 +27,18 @@ GEM
|
|
27
27
|
compare_linker (1.4.4)
|
28
28
|
httpclient
|
29
29
|
octokit
|
30
|
-
crack (0.4.
|
30
|
+
crack (0.4.5)
|
31
|
+
rexml
|
31
32
|
diff-lcs (1.4.4)
|
32
|
-
docile (1.3.
|
33
|
+
docile (1.3.4)
|
33
34
|
dotenv (2.7.6)
|
34
|
-
faraday (1.0
|
35
|
+
faraday (1.2.0)
|
35
36
|
multipart-post (>= 1.2, < 3)
|
37
|
+
ruby2_keywords
|
36
38
|
git (1.7.0)
|
37
39
|
rchardet (~> 1.8)
|
38
|
-
gitlab (4.
|
39
|
-
httparty (~> 0.
|
40
|
+
gitlab (4.17.0)
|
41
|
+
httparty (~> 0.18)
|
40
42
|
terminal-table (~> 1.5, >= 1.5.1)
|
41
43
|
gitlab_awesome_release (1.0.2)
|
42
44
|
dotenv
|
@@ -50,14 +52,14 @@ GEM
|
|
50
52
|
method_source (1.0.0)
|
51
53
|
mime-types (3.3.1)
|
52
54
|
mime-types-data (~> 3.2015)
|
53
|
-
mime-types-data (3.2020.
|
55
|
+
mime-types-data (3.2020.1104)
|
54
56
|
multi_xml (0.6.0)
|
55
57
|
multipart-post (2.1.1)
|
56
|
-
octokit (4.
|
58
|
+
octokit (4.19.0)
|
57
59
|
faraday (>= 0.9)
|
58
60
|
sawyer (~> 0.8.0, >= 0.5.3)
|
59
|
-
parallel (1.
|
60
|
-
parser (
|
61
|
+
parallel (1.20.1)
|
62
|
+
parser (3.0.0.0)
|
61
63
|
ast (~> 2.4.1)
|
62
64
|
pry (0.13.1)
|
63
65
|
coderay (~> 1.1)
|
@@ -67,66 +69,70 @@ GEM
|
|
67
69
|
pry (~> 0.13.0)
|
68
70
|
public_suffix (4.0.6)
|
69
71
|
rainbow (3.0.0)
|
70
|
-
rake (13.0.
|
72
|
+
rake (13.0.3)
|
71
73
|
rchardet (1.8.0)
|
72
|
-
regexp_parser (
|
74
|
+
regexp_parser (2.0.2)
|
73
75
|
restore_bundled_with (1.0.0)
|
74
76
|
git
|
75
77
|
thor
|
76
78
|
rexml (3.2.4)
|
77
|
-
rspec (3.
|
78
|
-
rspec-core (~> 3.
|
79
|
-
rspec-expectations (~> 3.
|
80
|
-
rspec-mocks (~> 3.
|
81
|
-
rspec-core (3.
|
82
|
-
rspec-support (~> 3.
|
83
|
-
rspec-expectations (3.
|
79
|
+
rspec (3.10.0)
|
80
|
+
rspec-core (~> 3.10.0)
|
81
|
+
rspec-expectations (~> 3.10.0)
|
82
|
+
rspec-mocks (~> 3.10.0)
|
83
|
+
rspec-core (3.10.1)
|
84
|
+
rspec-support (~> 3.10.0)
|
85
|
+
rspec-expectations (3.10.1)
|
84
86
|
diff-lcs (>= 1.2.0, < 2.0)
|
85
|
-
rspec-support (~> 3.
|
87
|
+
rspec-support (~> 3.10.0)
|
86
88
|
rspec-its (1.3.0)
|
87
89
|
rspec-core (>= 3.0.0)
|
88
90
|
rspec-expectations (>= 3.0.0)
|
89
|
-
rspec-mocks (3.
|
91
|
+
rspec-mocks (3.10.0)
|
90
92
|
diff-lcs (>= 1.2.0, < 2.0)
|
91
|
-
rspec-support (~> 3.
|
92
|
-
rspec-support (3.
|
93
|
+
rspec-support (~> 3.10.0)
|
94
|
+
rspec-support (3.10.1)
|
93
95
|
rspec-temp_dir (1.1.0)
|
94
96
|
rspec (>= 3.0)
|
95
|
-
rubocop (
|
97
|
+
rubocop (1.7.0)
|
96
98
|
parallel (~> 1.10)
|
97
99
|
parser (>= 2.7.1.5)
|
98
100
|
rainbow (>= 2.2.2, < 4.0)
|
99
|
-
regexp_parser (>= 1.
|
101
|
+
regexp_parser (>= 1.8, < 3.0)
|
100
102
|
rexml
|
101
|
-
rubocop-ast (>=
|
103
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
102
104
|
ruby-progressbar (~> 1.7)
|
103
105
|
unicode-display_width (>= 1.4.0, < 2.0)
|
104
|
-
rubocop-ast (
|
106
|
+
rubocop-ast (1.3.0)
|
105
107
|
parser (>= 2.7.1.5)
|
106
|
-
rubocop-performance (1.
|
107
|
-
rubocop (>= 0.
|
108
|
+
rubocop-performance (1.9.1)
|
109
|
+
rubocop (>= 0.90.0, < 2.0)
|
108
110
|
rubocop-ast (>= 0.4.0)
|
109
|
-
rubocop-rspec (1.
|
110
|
-
rubocop (~> 0
|
111
|
+
rubocop-rspec (2.1.0)
|
112
|
+
rubocop (~> 1.0)
|
113
|
+
rubocop-ast (>= 1.1.0)
|
111
114
|
rubocop_auto_corrector (0.4.1)
|
112
115
|
rubocop (>= 0.87.0)
|
113
116
|
ruby-progressbar (1.10.1)
|
117
|
+
ruby2_keywords (0.0.2)
|
114
118
|
sawyer (0.8.2)
|
115
119
|
addressable (>= 2.3.5)
|
116
120
|
faraday (> 0.8, < 2.0)
|
117
|
-
simplecov (0.
|
121
|
+
simplecov (0.20.0)
|
118
122
|
docile (~> 1.1)
|
119
123
|
simplecov-html (~> 0.11)
|
124
|
+
simplecov_json_formatter (~> 0.1)
|
120
125
|
simplecov-html (0.12.3)
|
126
|
+
simplecov_json_formatter (0.1.2)
|
121
127
|
terminal-table (1.8.0)
|
122
128
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
123
129
|
thor (1.0.1)
|
124
130
|
unicode-display_width (1.7.0)
|
125
|
-
webmock (3.
|
131
|
+
webmock (3.11.0)
|
126
132
|
addressable (>= 2.3.6)
|
127
133
|
crack (>= 0.3.2)
|
128
134
|
hashdiff (>= 0.4.0, < 2.0.0)
|
129
|
-
yard (0.9.
|
135
|
+
yard (0.9.26)
|
130
136
|
|
131
137
|
PLATFORMS
|
132
138
|
ruby
|
@@ -150,6 +156,3 @@ DEPENDENCIES
|
|
150
156
|
simplecov
|
151
157
|
webmock
|
152
158
|
yard
|
153
|
-
|
154
|
-
BUNDLED WITH
|
155
|
-
2.1.2
|
data/README.md
CHANGED
@@ -129,7 +129,7 @@ Usage: gitlabci-bundle-update-mr [options]
|
|
129
129
|
```
|
130
130
|
|
131
131
|
## ProTip
|
132
|
-
### Randomly assign
|
132
|
+
### Randomly assign one person to MergeRequest
|
133
133
|
```yml
|
134
134
|
include:
|
135
135
|
- remote: "https://gitlab.com/sue445/gitlabci-bundle-update-mr/raw/master/gitlabci-templates/continuous_bundle_update.yml"
|
@@ -153,6 +153,10 @@ continuous_bundle_update:
|
|
153
153
|
- ASSIGNEES=$(ruby -rtime -e 'a=%w[foo bar baz]; print a[Time.now.to_date.cweek% a.size]')
|
154
154
|
```
|
155
155
|
|
156
|
+
It will be assigned weekly in the following order.
|
157
|
+
|
158
|
+
`foo` -> `bar` -> `baz` -> `foo` -> `bar` -> `baz` -> ...
|
159
|
+
|
156
160
|
## Development
|
157
161
|
|
158
162
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -5,6 +5,7 @@ module Gitlabci
|
|
5
5
|
class Client # rubocop:disable Metrics/ClassLength
|
6
6
|
BRANCH_PREFIX = "bundle-update-".freeze
|
7
7
|
TITLE_PREFIX = "bundle update at ".freeze
|
8
|
+
MAX_RETRY_COUNT = 3
|
8
9
|
|
9
10
|
# rubocop:disable Metrics/ParameterLists
|
10
11
|
|
@@ -206,7 +207,23 @@ module Gitlabci
|
|
206
207
|
end
|
207
208
|
|
208
209
|
def accept_merge_request(mr_id)
|
209
|
-
|
210
|
+
with_retry do
|
211
|
+
@gitlab.accept_merge_request(@project_name, mr_id, merge_when_pipeline_succeeds: true, should_remove_source_branch: true)
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
def with_retry
|
216
|
+
retry_count ||= 0
|
217
|
+
|
218
|
+
yield
|
219
|
+
rescue Gitlab::Error::MethodNotAllowed => e
|
220
|
+
retry_count += 1
|
221
|
+
|
222
|
+
if retry_count > MAX_RETRY_COUNT
|
223
|
+
raise e
|
224
|
+
end
|
225
|
+
|
226
|
+
retry
|
210
227
|
end
|
211
228
|
|
212
229
|
def get_assignee_ids(assignees)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlabci-bundle-update-mr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -284,7 +284,7 @@ metadata:
|
|
284
284
|
homepage_uri: https://gitlab.com/sue445/gitlabci-bundle-update-mr
|
285
285
|
source_code_uri: https://gitlab.com/sue445/gitlabci-bundle-update-mr
|
286
286
|
changelog_uri: https://gitlab.com/sue445/gitlabci-bundle-update-mr/blob/master/CHANGELOG.md
|
287
|
-
post_install_message:
|
287
|
+
post_install_message:
|
288
288
|
rdoc_options: []
|
289
289
|
require_paths:
|
290
290
|
- lib
|
@@ -295,12 +295,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
295
295
|
version: 2.5.0
|
296
296
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
297
297
|
requirements:
|
298
|
-
- - "
|
298
|
+
- - ">"
|
299
299
|
- !ruby/object:Gem::Version
|
300
|
-
version:
|
300
|
+
version: 1.3.1
|
301
301
|
requirements: []
|
302
|
-
rubygems_version: 3.1.
|
303
|
-
signing_key:
|
302
|
+
rubygems_version: 3.1.4
|
303
|
+
signing_key:
|
304
304
|
specification_version: 4
|
305
305
|
summary: Create MergeRequest of bundle update in GitLab CI
|
306
306
|
test_files: []
|