modulesync 2.0.0 → 2.0.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
2
  SHA256:
3
- metadata.gz: 67b9f844d9a57ed46eb75c5a9848524dee4409b78c3c1c70576f1f1c9629d24a
4
- data.tar.gz: db8bbd7ca58ef57bf981c1ca49c91655d757f49920e598085e67a5e42a78b7b2
3
+ metadata.gz: fc930ee899499173ce75a299885bee85d967c158b6cfc7cc4113a73b6b7c82bf
4
+ data.tar.gz: 86575cd8683f4c89035d0f5018838bd3690d6a625e15480b7683fdd34e966e07
5
5
  SHA512:
6
- metadata.gz: 31d69cbe6c58f263a1bb9ba0c418d310505708bf52554d6145af1a9c3dd1ebbd06c987771fcc01c2c87d4e874f4fd918f46ca789342d802069969b196d6e5422
7
- data.tar.gz: 89e4f8f54ba515b855060306d562663c1d2b6eed8ccdabc51ecec3ad5d234f3043b546d6263c24cb8086447df5544193e2ab31d90ef181f6ccaf6e5888faf77a
6
+ metadata.gz: 6759dc5e250c03c3bf157dfee1a4890dcbd1c986ab735bb01e996cb4e181aa0b901c91f7b5138129915496ed8f514a66e902a0fae44eb466bf125992ef44e03d
7
+ data.tar.gz: a13a5de75f58baae2a9ad16f958553bc158a9a045b88b2982348f921e3d084aca8f0df575395a8390ed8d7d8ba65c204c06911a8288e55a76ae664c02d4f9f74
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [2.0.1](https://github.com/voxpupuli/modulesync/tree/2.0.1) (2020-10-06)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/modulesync/compare/2.0.0...2.0.1)
8
+
9
+ **Fixed bugs:**
10
+
11
+ - Use remote\_branch for PRs when specified [\#194](https://github.com/voxpupuli/modulesync/pull/194) ([raphink](https://github.com/raphink))
12
+
13
+ **Merged pull requests:**
14
+
15
+ - Allow newer puppet-blacksmith versions [\#197](https://github.com/voxpupuli/modulesync/pull/197) ([bastelfreak](https://github.com/bastelfreak))
16
+
5
17
  ## [2.0.0](https://github.com/voxpupuli/modulesync/tree/2.0.0) (2020-08-18)
6
18
 
7
19
  [Full Changelog](https://github.com/voxpupuli/modulesync/compare/1.3.0...2.0.0)
@@ -15,13 +15,14 @@ module ModuleSync
15
15
 
16
16
  def manage(namespace, module_name, options)
17
17
  repo_path = File.join(namespace, module_name)
18
- head = "#{namespace}:#{options[:branch]}"
18
+ branch = options[:remote_branch] || options[:branch]
19
+ head = "#{namespace}:#{branch}"
19
20
  target_branch = options[:pr_target_branch] || 'master'
20
21
 
21
22
  if options[:noop]
22
23
  $stdout.puts \
23
24
  "Using no-op. Would submit PR '#{options[:pr_title]}' to #{repo_path} " \
24
- "- merges #{options[:branch]} into #{target_branch}"
25
+ "- merges #{branch} into #{target_branch}"
25
26
  return
26
27
  end
27
28
 
@@ -31,19 +32,19 @@ module ModuleSync
31
32
  :head => head)
32
33
  unless pull_requests.empty?
33
34
  # Skip creating the PR if it exists already.
34
- $stdout.puts "Skipped! #{pull_requests.length} PRs found for branch #{options[:branch]}"
35
+ $stdout.puts "Skipped! #{pull_requests.length} PRs found for branch #{branch}"
35
36
  return
36
37
  end
37
38
 
38
39
  pr_labels = ModuleSync::Util.parse_list(options[:pr_labels])
39
40
  pr = @api.create_pull_request(repo_path,
40
41
  target_branch,
41
- options[:branch],
42
+ branch,
42
43
  options[:pr_title],
43
44
  options[:message])
44
45
  $stdout.puts \
45
46
  "Submitted PR '#{options[:pr_title]}' to #{repo_path} " \
46
- "- merges #{options[:branch]} into #{target_branch}"
47
+ "- merges #{branch} into #{target_branch}"
47
48
 
48
49
  # We only assign labels to the PR if we've discovered a list > 1. The labels MUST
49
50
  # already exist. We DO NOT create missing labels.
@@ -15,13 +15,14 @@ module ModuleSync
15
15
 
16
16
  def manage(namespace, module_name, options)
17
17
  repo_path = File.join(namespace, module_name)
18
- head = "#{namespace}:#{options[:branch]}"
18
+ branch = options[:remote_branch] || options[:branch]
19
+ head = "#{namespace}:#{branch}"
19
20
  target_branch = options[:pr_target_branch] || 'master'
20
21
 
21
22
  if options[:noop]
22
23
  $stdout.puts \
23
24
  "Using no-op. Would submit MR '#{options[:pr_title]}' to #{repo_path} " \
24
- "- merges #{options[:branch]} into #{target_branch}"
25
+ "- merges #{branch} into #{target_branch}"
25
26
  return
26
27
  end
27
28
 
@@ -31,19 +32,19 @@ module ModuleSync
31
32
  :target_branch => target_branch)
32
33
  unless merge_requests.empty?
33
34
  # Skip creating the MR if it exists already.
34
- $stdout.puts "Skipped! #{merge_requests.length} MRs found for branch #{options[:branch]}"
35
+ $stdout.puts "Skipped! #{merge_requests.length} MRs found for branch #{branch}"
35
36
  return
36
37
  end
37
38
 
38
39
  mr_labels = ModuleSync::Util.parse_list(options[:pr_labels])
39
40
  mr = @api.create_merge_request(repo_path,
40
41
  options[:pr_title],
41
- :source_branch => options[:branch],
42
+ :source_branch => branch,
42
43
  :target_branch => target_branch,
43
44
  :labels => mr_labels)
44
45
  $stdout.puts \
45
46
  "Submitted MR '#{options[:pr_title]}' to #{repo_path} " \
46
- "- merges #{options[:branch]} into #{target_branch}"
47
+ "- merges #{branch} into #{target_branch}"
47
48
 
48
49
  return if mr_labels.empty?
49
50
  $stdout.puts "Attached the following labels to MR #{mr.iid}: #{mr_labels.join(', ')}"
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'modulesync'
6
- spec.version = '2.0.0'
6
+ spec.version = '2.0.1'
7
7
  spec.authors = ['Vox Pupuli']
8
8
  spec.email = ['voxpupuli@groups.io']
9
9
  spec.summary = 'Puppet Module Synchronizer'
@@ -26,6 +26,6 @@ Gem::Specification.new do |spec|
26
26
  spec.add_runtime_dependency 'git', '~>1.3'
27
27
  spec.add_runtime_dependency 'gitlab', '~>4.0'
28
28
  spec.add_runtime_dependency 'octokit', '~>4.0'
29
- spec.add_runtime_dependency 'puppet-blacksmith', '~>3.0'
29
+ spec.add_runtime_dependency 'puppet-blacksmith', '>= 3.0', '< 7'
30
30
  spec.add_runtime_dependency 'thor'
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modulesync
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-18 00:00:00.000000000 Z
11
+ date: 2020-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aruba
@@ -126,16 +126,22 @@ dependencies:
126
126
  name: puppet-blacksmith
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '3.0'
132
+ - - "<"
133
+ - !ruby/object:Gem::Version
134
+ version: '7'
132
135
  type: :runtime
133
136
  prerelease: false
134
137
  version_requirements: !ruby/object:Gem::Requirement
135
138
  requirements:
136
- - - "~>"
139
+ - - ">="
137
140
  - !ruby/object:Gem::Version
138
141
  version: '3.0'
142
+ - - "<"
143
+ - !ruby/object:Gem::Version
144
+ version: '7'
139
145
  - !ruby/object:Gem::Dependency
140
146
  name: thor
141
147
  requirement: !ruby/object:Gem::Requirement