multi_repo 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 313d72f8febb801872f9f65ade31381a3104b32a21d1628e8c56ee3186b78164
4
- data.tar.gz: 1850ed479241b145ba84295dcfe0a0cde15bce8d28f81c2fb11df90e69349d40
3
+ metadata.gz: bc809429c529e0f58d2274708e0785944edf7170ce7aa23858fc88031bb593e1
4
+ data.tar.gz: 7d58ebc46fe2202b9e2e285e6a26fc4b4a40556181301a651994d41b9e4c1d5f
5
5
  SHA512:
6
- metadata.gz: 9e5ce408edfeab47540e55241c6508cc6d0d84be9e31cc9531ecf7136d44c2b8be3797c7a909128fa22a0ba67f864e485eac32f121c68bd5afba674d983845be
7
- data.tar.gz: c178885fe71a1f399d25f661081cb7560bdaba988d9b4a4ac1ec0c4b207858c798f18b751da988c7aa864a6a1854af96d6de361b55530b37ac8069699e9241e8
6
+ metadata.gz: 4828418ee29894ce72fd5d2ab2e705b99854f1aa5ba26f321a0235bfa7c7eadf45a5aada881897aa5df16fb6f83cdd1968113af80e0163d2a13a9e4dd354ee2d
7
+ data.tar.gz: b4b2ed2d3c9677e658ad4c60ec615779882dee381bc5ed4b771602d56ca0a5b72ade124e140d50568a359c5e838d99ce3c51a8a475925a096d0582b7adc0cf9e
data/.codeclimate.yml CHANGED
@@ -12,5 +12,5 @@ plugins:
12
12
  rubocop:
13
13
  enabled: true
14
14
  config: ".rubocop_cc.yml"
15
- channel: rubocop-0-82
15
+ channel: rubocop-1-56-3
16
16
  version: '2'
data/CHANGELOG.md CHANGED
@@ -4,11 +4,20 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.4.0] - 2024-03-29
8
+ ### Changed
9
+ - Allow overriding the path for a repo [[#28](https://github.com/ManageIQ/multi_repo/pull/28)]
10
+
11
+ ### Fixed
12
+ - [update_milestone] Fix issue where a due date was required to close a milestone [[#24](https://github.com/ManageIQ/multi_repo/pull/24)]
13
+ - [GitHub service] Use newer method for actions-secrets creation [[#27](https://github.com/ManageIQ/multi_repo/pull/27)]
14
+
7
15
  ## [0.3.1] - 2024-01-31
8
16
  ### Fixed
9
17
  - [pull_request_blaster_outer] Various fixes and cleanup output [[#21](https://github.com/ManageIQ/multi_repo/pull/21)]
10
- - [show_commit_history] Prevent missing ranges from failing the entire run [[#22](https://github.com/ManageIQ/multi_repo/pull/22)]
18
+ - [show_commit_history] Prevent missing ranges from failing the entire run [[#20](https://github.com/ManageIQ/multi_repo/pull/20)]
11
19
  - [pull_request_merger] Fixing issue passing kwargs on Ruby 3 [[#23](https://github.com/ManageIQ/multi_repo/pull/23)]
12
20
 
13
- [Unreleased]: https://github.com/ManageIQ/more_core_extensions/compare/v0.3.1...HEAD
21
+ [Unreleased]: https://github.com/ManageIQ/more_core_extensions/compare/v0.4.0...HEAD
22
+ [0.4.0]: https://github.com/ManageIQ/more_core_extensions/compare/v0.3.1...v0.4.0
14
23
  [0.3.1]: https://github.com/ManageIQ/more_core_extensions/compare/v0.3.0...v0.3.1
@@ -1,5 +1,3 @@
1
-
2
-
3
1
  module MultiRepo::Helpers
4
2
  class UpdateMilestone
5
3
  attr_reader :repo_name, :title, :due_on, :close, :github
@@ -15,15 +13,19 @@ module MultiRepo::Helpers
15
13
  end
16
14
 
17
15
  def run
18
- due_on_str = due_on.strftime("%Y-%m-%d").inspect
19
-
20
16
  existing = github.find_milestone_by_title(repo_name, title)
17
+
21
18
  if close
22
19
  if existing
23
20
  puts "Closing milestone #{title.inspect} (#{existing.number})"
24
- github.close_milestone(repo_name, title, existing.number)
21
+ github.close_milestone(repo_name, existing.number)
25
22
  end
26
- elsif existing
23
+ return
24
+ end
25
+
26
+ due_on_str = due_on.strftime("%Y-%m-%d").inspect
27
+
28
+ if existing
27
29
  puts "Updating milestone #{title.inspect} (#{existing.number}) with due date #{due_on_str}"
28
30
  github.update_milestone(repo_name, existing.number, due_on)
29
31
  else
@@ -5,11 +5,11 @@ module MultiRepo
5
5
  attr_reader :name, :config, :path
6
6
  attr_accessor :dry_run
7
7
 
8
- def initialize(name, config: nil, dry_run: false)
8
+ def initialize(name, path: nil, config: nil, dry_run: false)
9
9
  @name = name
10
10
  @dry_run = dry_run
11
11
  @config = OpenStruct.new(config || {})
12
- @path = MultiRepo.repos_dir.join(name)
12
+ @path = path || MultiRepo.repos_dir.join(name)
13
13
  end
14
14
 
15
15
  alias to_s inspect
@@ -212,17 +212,19 @@ module MultiRepo::Service
212
212
  payload = encode_secret(repo_name, value)
213
213
 
214
214
  if dry_run
215
- puts "** dry-run: github.create_or_update_secret(#{repo_name.inspect}, #{key.inspect}, #{payload.inspect})".light_black
215
+ puts "** dry-run: github.create_or_update_actions_secret(#{repo_name.inspect}, #{key.inspect}, #{payload.inspect})".light_black
216
216
  else
217
- client.create_or_update_secret(repo_name, key, payload)
217
+ client.create_or_update_actions_secret(repo_name, key, payload)
218
218
  end
219
219
  end
220
220
 
221
221
  private def encode_secret(repo_name, value)
222
+ raise ArgumentError, "value to encode cannot be nil" if value.nil?
223
+
222
224
  require "rbnacl"
223
225
  require "base64"
224
226
 
225
- repo_public_key = client.get_public_key(repo_name)
227
+ repo_public_key = client.get_actions_public_key(repo_name)
226
228
  decoded_repo_public_key = Base64.decode64(repo_public_key.key)
227
229
  public_key = RbNaCl::PublicKey.new(decoded_repo_public_key)
228
230
  box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
@@ -1,3 +1,3 @@
1
1
  module MultiRepo
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0".freeze
3
3
  end
data/multi_repo.gemspec CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.add_runtime_dependency "licensee"
29
29
  spec.add_runtime_dependency "minigit"
30
30
  spec.add_runtime_dependency "more_core_extensions"
31
- spec.add_runtime_dependency "octokit", ">=4.23.0"
31
+ spec.add_runtime_dependency "octokit", ">= 7.0.0"
32
32
  spec.add_runtime_dependency "optimist"
33
33
  spec.add_runtime_dependency "progressbar"
34
34
  spec.add_runtime_dependency "psych", ">=3"
data/renovate.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:recommended"
5
+ ]
6
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multi_repo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Authors
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-31 00:00:00.000000000 Z
11
+ date: 2024-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 4.23.0
103
+ version: 7.0.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: 4.23.0
110
+ version: 7.0.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: optimist
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -310,6 +310,7 @@ files:
310
310
  - lib/multi_repo/service/travis.rb
311
311
  - lib/multi_repo/version.rb
312
312
  - multi_repo.gemspec
313
+ - renovate.json
313
314
  - repos/.gitkeep
314
315
  - scripts/delete_labels
315
316
  - scripts/destroy_branch
@@ -359,7 +360,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
359
360
  - !ruby/object:Gem::Version
360
361
  version: '0'
361
362
  requirements: []
362
- rubygems_version: 3.2.33
363
+ rubygems_version: 3.3.26
363
364
  signing_key:
364
365
  specification_version: 4
365
366
  summary: MultiRepo is a library for managing multiple repositiories and running scripts