gitlabci-bundle-update-mr 5.0.1 → 5.1.0.beta1

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: 6e8ccb89165d72c281b87b804f6bee93697628d656dec2ef68d620b64b53766f
4
- data.tar.gz: 2a9d8c02c2a9e3e147edcdd34b23b3eb419f5232788f6ed09c44e13ad39d31ee
3
+ metadata.gz: adea38bfbdde56ee4879790dc6d86b0e83a153554b82f215cf8ddb836c7351ac
4
+ data.tar.gz: 448afbba8651048cc4f0ab0721fabce0e111b5d30f1be2900ea73b680a79af75
5
5
  SHA512:
6
- metadata.gz: e1fd7d9ad0ff855f695251b13a0f30d3c88de32c50b407b4d9e927888d84de2688d4037153bbac27b0a93fbaf1125e15b6e5a278b321a265ca714de74f52777e
7
- data.tar.gz: caf95641d0632f15e189abcc6fed050cde5de0aff0e7f09e69cc31daf03c3e52e9c0717d033d7f09d8f4f200f5590a3389754ed18d424da021815e53bea489a8
6
+ metadata.gz: 89cebe2fcdf3c604f1fb30f4116761eeedc3f82eda781ac1ca3c7be980d58dbf557058f5bfafaa91925f705baf7f1d05f0d9c4428349940b23e01b390162d4fe
7
+ data.tar.gz: 2c40ca146c7f026f4f3cb389e422eab78743380d1ec04f28813d07674630ed24cbe9e8062095bfb42e58d1cdc33993f34f869c5daa2b90efc8a1d730deacd424
data/.gitlab-ci.yml CHANGED
@@ -3,21 +3,16 @@ stages:
3
3
  - deploy
4
4
 
5
5
  include:
6
- - local: "/gitlabci-templates/continuous_bundle_update.yml"
6
+ - local: gitlabci-components/continuous_bundle_update.yml
7
+ inputs:
8
+ merge_when_pipeline_succeeds: true
9
+ job_stage: build
10
+ assignees: sue445
7
11
 
8
- continuous_bundle_update:
9
- stage: build
10
-
11
- variables:
12
- CACHE_VERSION: "v2"
13
- GIT_EMAIL: "gitlabci@example.com"
14
- GIT_USER: "GitLab CI"
15
- OPTIONS: "--merge-when-pipeline-succeeds"
16
- ASSIGNEES: "sue445"
17
-
18
- before_script:
19
- # Set timezone to Asia/Tokyo
20
- - cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
12
+ job_before_script:
13
+ - set -xe # TODO: debug
14
+ # Set timezone to Asia/Tokyo
15
+ - cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
21
16
 
22
17
  .default:
23
18
  cache:
@@ -79,6 +74,8 @@ pages:
79
74
  paths:
80
75
  - public
81
76
  rules:
77
+ - if: '$CI_PIPELINE_SOURCE == "schedule"'
78
+ when: never
82
79
  - if: '$CI_COMMIT_BRANCH == "master"'
83
80
 
84
81
  gitlab_awesome_release:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## Unreleased
2
- [full changelog](https://gitlab.com/sue445/gitlabci-bundle-update-mr/compare/v5.0.1...master)
2
+ [full changelog](https://gitlab.com/sue445/gitlabci-bundle-update-mr/compare/v5.0.2...master)
3
+
4
+ ## v5.0.2
5
+ [full changelog](https://gitlab.com/sue445/gitlabci-bundle-update-mr/compare/v5.0.1...v5.0.2)
6
+
7
+ * Remove workaround for error in Ruby 3.4+ [!354](https://gitlab.com/sue445/gitlabci-bundle-update-mr/-/merge_requests/354) *@sue445*
3
8
 
4
9
  ## v5.0.1
5
10
  [full changelog](https://gitlab.com/sue445/gitlabci-bundle-update-mr/compare/v5.0.0...v5.0.1)
data/Gemfile CHANGED
@@ -6,6 +6,3 @@ gemspec
6
6
 
7
7
  # FIXME: following gems are often downgraded when `bundle update`
8
8
  gem "sawyer", ">= 0.8.1"
9
-
10
- # octokit 5.0.0+ requires Ruby 2.7.0+
11
- gem "octokit", "< 5.0.0"
data/Gemfile.lock CHANGED
@@ -1,12 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlabci-bundle-update-mr (5.0.1)
4
+ gitlabci-bundle-update-mr (5.1.0.beta1)
5
5
  bundler
6
- compare_linker (>= 1.4.3)
6
+ compare_linker (>= 1.4.11)
7
7
  git (= 1.7.0)
8
8
  gitlab (>= 4.19.0)
9
- mutex_m
10
9
  restore_bundled_with
11
10
 
12
11
  GEM
@@ -14,10 +13,10 @@ GEM
14
13
  specs:
15
14
  addressable (2.8.7)
16
15
  public_suffix (>= 2.0.2, < 7.0)
17
- ast (2.4.2)
16
+ ast (2.4.3)
18
17
  base64 (0.2.0)
19
- bigdecimal (3.1.9)
20
- compare_linker (1.4.8)
18
+ bigdecimal (3.2.3)
19
+ compare_linker (1.4.11)
21
20
  base64
22
21
  httpclient
23
22
  octokit
@@ -25,37 +24,40 @@ GEM
25
24
  crack (1.0.0)
26
25
  bigdecimal
27
26
  rexml
28
- csv (3.3.2)
29
- diff-lcs (1.5.1)
27
+ csv (3.3.5)
28
+ diff-lcs (1.6.2)
30
29
  docile (1.4.1)
31
- dotenv (3.1.7)
32
- faraday (2.12.2)
30
+ dotenv (3.1.8)
31
+ faraday (2.14.0)
33
32
  faraday-net_http (>= 2.0, < 3.5)
34
33
  json
35
34
  logger
36
- faraday-net_http (3.4.0)
35
+ faraday-net_http (3.4.1)
37
36
  net-http (>= 0.5.0)
38
37
  git (1.7.0)
39
38
  rchardet (~> 1.8)
40
- gitlab (5.1.0)
39
+ gitlab (6.0.0)
41
40
  base64 (~> 0.2.0)
42
41
  httparty (~> 0.20)
43
42
  terminal-table (>= 1.5.1)
44
- gitlab_awesome_release (1.1.0)
43
+ gitlab_awesome_release (1.1.1)
45
44
  dotenv
46
45
  gitlab (>= 4.0.0)
46
+ logger
47
47
  thor
48
- hashdiff (1.1.2)
49
- httparty (0.22.0)
48
+ hashdiff (1.2.1)
49
+ httparty (0.23.1)
50
50
  csv
51
51
  mini_mime (>= 1.0.0)
52
52
  multi_xml (>= 0.5.2)
53
- httpclient (2.8.3)
54
- json (2.9.1)
55
- language_server-protocol (3.17.0.3)
56
- logger (1.6.4)
53
+ httpclient (2.9.0)
54
+ mutex_m
55
+ json (2.15.0)
56
+ language_server-protocol (3.17.0.5)
57
+ lint_roller (1.1.0)
58
+ logger (1.7.0)
57
59
  mini_mime (1.1.5)
58
- multi_xml (0.7.1)
60
+ multi_xml (0.7.2)
59
61
  bigdecimal (~> 3.1)
60
62
  mutex_m (0.3.0)
61
63
  net-http (0.6.0)
@@ -66,56 +68,61 @@ GEM
66
68
  onkcop (1.0.0.0)
67
69
  rubocop (>= 0.80.0)
68
70
  rubocop-rspec (>= 1.34.0)
69
- ostruct (0.6.1)
70
- parallel (1.26.3)
71
- parser (3.3.6.0)
71
+ ostruct (0.6.3)
72
+ parallel (1.27.0)
73
+ parser (3.3.9.0)
72
74
  ast (~> 2.4.1)
73
75
  racc
74
- public_suffix (6.0.1)
76
+ prism (1.5.1)
77
+ public_suffix (6.0.2)
75
78
  racc (1.8.1)
76
79
  rainbow (3.1.1)
77
- rake (13.2.1)
78
- rchardet (1.9.0)
79
- regexp_parser (2.10.0)
80
+ rake (13.3.0)
81
+ rchardet (1.10.0)
82
+ regexp_parser (2.11.3)
80
83
  restore_bundled_with (1.0.0)
81
84
  git
82
85
  thor
83
- rexml (3.4.0)
84
- rspec (3.13.0)
86
+ rexml (3.4.4)
87
+ rspec (3.13.1)
85
88
  rspec-core (~> 3.13.0)
86
89
  rspec-expectations (~> 3.13.0)
87
90
  rspec-mocks (~> 3.13.0)
88
- rspec-core (3.13.2)
91
+ rspec-core (3.13.5)
89
92
  rspec-support (~> 3.13.0)
90
- rspec-expectations (3.13.3)
93
+ rspec-expectations (3.13.5)
91
94
  diff-lcs (>= 1.2.0, < 2.0)
92
95
  rspec-support (~> 3.13.0)
93
96
  rspec-its (2.0.0)
94
97
  rspec-core (>= 3.13.0)
95
98
  rspec-expectations (>= 3.13.0)
96
- rspec-mocks (3.13.2)
99
+ rspec-mocks (3.13.5)
97
100
  diff-lcs (>= 1.2.0, < 2.0)
98
101
  rspec-support (~> 3.13.0)
99
- rspec-support (3.13.2)
102
+ rspec-support (3.13.6)
100
103
  rspec-temp_dir (1.1.1)
101
104
  rspec (>= 3.0)
102
- rubocop (1.69.2)
105
+ rubocop (1.81.1)
103
106
  json (~> 2.3)
104
- language_server-protocol (>= 3.17.0)
107
+ language_server-protocol (~> 3.17.0.2)
108
+ lint_roller (~> 1.1.0)
105
109
  parallel (~> 1.10)
106
110
  parser (>= 3.3.0.2)
107
111
  rainbow (>= 2.2.2, < 4.0)
108
112
  regexp_parser (>= 2.9.3, < 3.0)
109
- rubocop-ast (>= 1.36.2, < 2.0)
113
+ rubocop-ast (>= 1.47.1, < 2.0)
110
114
  ruby-progressbar (~> 1.7)
111
115
  unicode-display_width (>= 2.4.0, < 4.0)
112
- rubocop-ast (1.37.0)
113
- parser (>= 3.3.1.0)
114
- rubocop-performance (1.23.1)
115
- rubocop (>= 1.48.1, < 2.0)
116
- rubocop-ast (>= 1.31.1, < 2.0)
117
- rubocop-rspec (3.3.0)
118
- rubocop (~> 1.61)
116
+ rubocop-ast (1.47.1)
117
+ parser (>= 3.3.7.2)
118
+ prism (~> 1.4)
119
+ rubocop-performance (1.26.0)
120
+ lint_roller (~> 1.1)
121
+ rubocop (>= 1.75.0, < 2.0)
122
+ rubocop-ast (>= 1.44.0, < 2.0)
123
+ rubocop-rspec (3.7.0)
124
+ lint_roller (~> 1.1)
125
+ rubocop (~> 1.72, >= 1.72.1)
119
126
  rubocop_auto_corrector (0.5.0)
120
127
  rubocop (>= 1.30.0)
121
128
  ruby-progressbar (1.13.0)
@@ -126,17 +133,19 @@ GEM
126
133
  docile (~> 1.1)
127
134
  simplecov-html (~> 0.11)
128
135
  simplecov_json_formatter (~> 0.1)
129
- simplecov-cobertura (2.1.0)
136
+ simplecov-cobertura (3.1.0)
130
137
  rexml
131
138
  simplecov (~> 0.19)
132
- simplecov-html (0.13.1)
139
+ simplecov-html (0.13.2)
133
140
  simplecov_json_formatter (0.1.4)
134
- terminal-table (3.0.2)
135
- unicode-display_width (>= 1.1.1, < 3)
136
- thor (1.3.2)
137
- unicode-display_width (2.6.0)
138
- uri (1.0.2)
139
- webmock (3.24.0)
141
+ terminal-table (4.0.0)
142
+ unicode-display_width (>= 1.1.1, < 4)
143
+ thor (1.4.0)
144
+ unicode-display_width (3.2.0)
145
+ unicode-emoji (~> 4.1)
146
+ unicode-emoji (4.1.0)
147
+ uri (1.0.3)
148
+ webmock (3.25.1)
140
149
  addressable (>= 2.8.0)
141
150
  crack (>= 0.3.2)
142
151
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -149,7 +158,6 @@ DEPENDENCIES
149
158
  dotenv
150
159
  gitlab_awesome_release
151
160
  gitlabci-bundle-update-mr!
152
- octokit (< 5.0.0)
153
161
  onkcop (>= 1.0.0.0)
154
162
  rake (>= 10.0)
155
163
  rspec (~> 3.0)
data/README.md CHANGED
@@ -86,8 +86,8 @@ continuous_bundle_update:
86
86
  - schedules
87
87
  ```
88
88
 
89
- ### Step 1-B. Using `include`
90
- `include` is available in one of the following versions.
89
+ ### Step 1-B. Using `include` template (Deprecated)
90
+ `include` template is available in one of the following versions.
91
91
 
92
92
  * GitLab Core 11.4+
93
93
  * GitLab Premium 10.5+
@@ -119,6 +119,38 @@ continuous_bundle_update:
119
119
  - cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
120
120
  ```
121
121
 
122
+ ### Step 1-C. Using `include` component
123
+ [CI/CD components](https://docs.gitlab.com/ci/components/) is available since GitLab 17.0+
124
+
125
+ example (minimum)
126
+
127
+ ```yml
128
+ include:
129
+ - remote: https://gitlab.com/sue445/gitlabci-bundle-update-mr/-/raw/master/gitlabci-components/continuous_bundle_update.yml
130
+ ```
131
+
132
+ example (custom)
133
+
134
+ ```yml
135
+ include:
136
+ - remote: https://gitlab.com/sue445/gitlabci-bundle-update-mr/-/raw/master/gitlabci-components/continuous_bundle_update.yml
137
+ inputs:
138
+ merge_when_pipeline_succeeds: true
139
+ job_stage: build
140
+
141
+ job_before_script:
142
+ - cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
143
+
144
+ job_rules:
145
+ - if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_PIPELINE_SCHEDULE_DESCRIPTION == "continuous_bundle_update"'
146
+ - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
147
+ when: never
148
+ ```
149
+
150
+ full options are following.
151
+
152
+ [gitlabci-components/continuous_bundle_update.yml](gitlabci-components/continuous_bundle_update.yml)
153
+
122
154
  ### Step 2. Register scheduler
123
155
  And register scheduler to `https://YOUR-GITLAB/YOUR-NAME/REPO-NAME/pipeline_schedules`
124
156
 
@@ -38,15 +38,11 @@ Gem::Specification.new do |spec|
38
38
  spec.required_ruby_version = ">= 3.1.2"
39
39
 
40
40
  spec.add_dependency "bundler"
41
- spec.add_dependency "compare_linker", ">= 1.4.3"
41
+ spec.add_dependency "compare_linker", ">= 1.4.11"
42
42
  spec.add_dependency "git", "1.7.0"
43
43
  spec.add_dependency "gitlab", ">= 4.19.0"
44
44
  spec.add_dependency "restore_bundled_with"
45
45
 
46
- # FIXME: Workaround for error in Ruby 3.4+
47
- # https://github.com/nahi/httpclient/pull/455 is merged, but not published yet...
48
- spec.add_dependency "mutex_m"
49
-
50
46
  spec.add_development_dependency "dotenv"
51
47
  spec.add_development_dependency "gitlab_awesome_release"
52
48
  spec.add_development_dependency "onkcop", ">= 1.0.0.0"
@@ -0,0 +1,115 @@
1
+ spec:
2
+ inputs:
3
+ job_name:
4
+ default: continuous_bundle_update
5
+
6
+ job_stage:
7
+ default: test
8
+
9
+ job_image:
10
+ default: ruby
11
+
12
+ job_before_script:
13
+ type: array
14
+ default: []
15
+
16
+ job_rules:
17
+ type: array
18
+ default:
19
+ - if: '$CI_PIPELINE_SOURCE == "schedule"'
20
+ - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
21
+ when: never
22
+
23
+ cache_key:
24
+ default: "v1-$CI_JOB_NAME_SLUG"
25
+
26
+ git_email:
27
+ default: "gitlabci@example.com"
28
+
29
+ git_user:
30
+ default: "GitLab CI"
31
+
32
+ gem_version:
33
+ default: ""
34
+ description: "gitlabci-bundle-update-mr version (default: latest)"
35
+
36
+ gem_install_options:
37
+ default: "--no-doc"
38
+ description: "Passed to 'gem install gitlabci-bundle-update-mr'"
39
+
40
+ labels:
41
+ default: "bundle update"
42
+ description: "Add labels to the MR (e.g. 'In Review, Update')"
43
+
44
+ assignees:
45
+ default: ""
46
+ description: "Add assignees to the MR (e.g. 'foo, bar')"
47
+
48
+ duplicate:
49
+ type: boolean
50
+ default: false
51
+ description: "Make MR even if it has already existed"
52
+
53
+ update_bundled_with:
54
+ type: boolean
55
+ default: false
56
+ description: "Whether to update `BUNDLED WITH` section in Gemfile.lock"
57
+
58
+ merge_when_pipeline_succeeds:
59
+ type: boolean
60
+ default: false
61
+ description: "Whether to set 'Merge when pipeline succeeds'"
62
+
63
+ ---
64
+
65
+ $[[ inputs.job_name ]]:
66
+ image: $[[ inputs.job_image ]]
67
+
68
+ stage: $[[ inputs.job_stage ]]
69
+
70
+ variables:
71
+ GIT_EMAIL: $[[ inputs.git_email ]]
72
+ GIT_USER: $[[ inputs.git_user ]]
73
+ GEM_VERSION: $[[ inputs.gem_version ]]
74
+ GEM_INSTALL_OPTIONS: $[[ inputs.gem_install_options ]]
75
+ LABELS: $[[ inputs.labels ]]
76
+ ASSIGNEES: $[[ inputs.assignees ]]
77
+ DUPLICATE: $[[ inputs.duplicate ]]
78
+ UPDATE_BUNDLED_WITH: $[[ inputs.update_bundled_with ]]
79
+ MERGE_WHEN_PIPELINE_SUCCEEDS: $[[ inputs.merge_when_pipeline_succeeds ]]
80
+
81
+ cache:
82
+ key: $[[ inputs.cache_key ]]
83
+ paths:
84
+ - vendor/bundle/
85
+
86
+ before_script: $[[ inputs.job_before_script ]]
87
+
88
+ script:
89
+ - bundle config --local path 'vendor/bundle'
90
+ - bundle install --retry=3 --jobs=$(nproc)
91
+ - bundle clean
92
+ - |
93
+ if [ -n "$GEM_VERSION" ]; then
94
+ GEM_INSTALL_OPTIONS="--version $GEM_VERSION $GEM_INSTALL_OPTIONS"
95
+ fi
96
+ - gem install gitlabci-bundle-update-mr $GEM_INSTALL_OPTIONS
97
+
98
+ - |
99
+ OPTIONS=""
100
+ if [ -n "$ASSIGNEES" ]; then
101
+ OPTIONS="$OPTIONS --assignees $ASSIGNEES"
102
+ fi
103
+ if $DUPLICATE; then
104
+ OPTIONS="$OPTIONS --duplicate"
105
+ fi
106
+ if $UPDATE_BUNDLED_WITH; then
107
+ OPTIONS="$OPTIONS --update-bundled-with"
108
+ fi
109
+ if $MERGE_WHEN_PIPELINE_SUCCEEDS; then
110
+ OPTIONS="$OPTIONS --merge-when-pipeline-succeeds"
111
+ fi
112
+
113
+ - gitlabci-bundle-update-mr --user="$GIT_USER" --email="$GIT_EMAIL" --labels="$LABELS" $OPTIONS
114
+
115
+ rules: $[[ inputs.job_rules ]]
@@ -208,7 +208,7 @@ module Gitlabci
208
208
 
209
209
  def accept_merge_request(mr_id)
210
210
  with_retry do
211
- @gitlab.accept_merge_request(@project_name, mr_id, merge_when_pipeline_succeeds: true, should_remove_source_branch: true)
211
+ @gitlab.accept_merge_request(@project_name, mr_id, merge_when_pipeline_succeeds: true, auto_merge: true, should_remove_source_branch: true)
212
212
  end
213
213
  end
214
214
 
@@ -2,7 +2,7 @@ module Gitlabci
2
2
  module Bundle
3
3
  module Update
4
4
  module Mr
5
- VERSION = "5.0.1".freeze
5
+ VERSION = "5.1.0.beta1".freeze
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlabci-bundle-update-mr
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.1.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-01-08 00:00:00.000000000 Z
10
+ date: 2025-10-17 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bundler
@@ -29,14 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 1.4.3
32
+ version: 1.4.11
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 1.4.3
39
+ version: 1.4.11
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: git
42
42
  requirement: !ruby/object:Gem::Requirement
@@ -79,20 +79,6 @@ dependencies:
79
79
  - - ">="
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
- - !ruby/object:Gem::Dependency
83
- name: mutex_m
84
- requirement: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- version: '0'
89
- type: :runtime
90
- prerelease: false
91
- version_requirements: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- version: '0'
96
82
  - !ruby/object:Gem::Dependency
97
83
  name: dotenv
98
84
  requirement: !ruby/object:Gem::Requirement
@@ -343,6 +329,7 @@ files:
343
329
  - bin/setup
344
330
  - exe/gitlabci-bundle-update-mr
345
331
  - gitlabci-bundle-update-mr.gemspec
332
+ - gitlabci-components/continuous_bundle_update.yml
346
333
  - gitlabci-templates/continuous_bundle_update.yml
347
334
  - lib/gitlabci/bundle/update/mr.rb
348
335
  - lib/gitlabci/bundle/update/mr/client.rb