peoplegroup-connectors 0.1.10 → 0.1.11

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: c78c67d1667a5441fdc3c59cd7aceaead99cc3c23e6f646a2a29a837ceef8c69
4
- data.tar.gz: 666e6fec2e69ea4ed830a9247a61fa5fe9f43d9ae363aff5223c8a07554f5262
3
+ metadata.gz: 2193145f0bfa0c5e69c282db2c6d3c6d61c98c5ddf97f6a5adf50e9d3041c932
4
+ data.tar.gz: 06c04625b87ce7653df20a404a7bd8dd0c696516f6aa24523542985ad06373b5
5
5
  SHA512:
6
- metadata.gz: 6493e56abb36adacbab060fcf91f41db56bd69e8280d028e7086bc73ceae8a144ef8f7c84850640ffcc70a5577323387365a936099c93c3611875171a0dd6d12
7
- data.tar.gz: c3bda22d3e0612c3c059c80cee5aea1f866b4dfbae0b0fa391b320d87063b4f8ec1bc65f86dcae192a71bd9c68a0dcc0facc6536106ad3553fb9d279d5f3e3de
6
+ metadata.gz: 237ba92529a93da4c53b20ec134545f7873b8d677c7a33d36ab009b9e21b49316de6e51a27cac18f408619db59d4b006037cbeced4ec8aad229c1b4ba5f695f4
7
+ data.tar.gz: fc4b1ef1b8dd1271ea1c61fd164f673a444fe8dc27966925d9f320cc09e06b521316bdaba26d8d5dc557b02555ea46f1535fef985350f82ff474ec1b85cdc76b
@@ -45,7 +45,25 @@ module PeopleGroup
45
45
  epic || @client.create_epic(group_id, title, options)
46
46
  end
47
47
 
48
- def commit_change_to_new_merge_request_v2(project_id, branch_name, commit_message, description = '', files_to_delete = [], files_to_update = [])
48
+ def commit_new_files_to_new_merge_request(project_id, branch_name, new_files, commit_message, description = nil)
49
+ @client.create_branch(project_id, branch_name, 'master')
50
+ actions = []
51
+ new_files.each do |file|
52
+ actions << {
53
+ action: 'create',
54
+ file_path: file.sub('tmp', '/data/team_members'),
55
+ content: File.read(file)
56
+ }
57
+ end
58
+
59
+ @client.create_commit(project_id, branch_name, commit_message, actions)
60
+
61
+ options = { source_branch: branch_name, target_branch: 'master', remove_source_branch: true }
62
+ options[:description] = description if description
63
+ @client.create_merge_request(project_id, commit_message, options)
64
+ end
65
+
66
+ def commit_change_to_new_merge_request_v2(project_id, branch_name, commit_message, description = nil, files_to_delete = [], files_to_update = [])
49
67
  actions = []
50
68
 
51
69
  files_to_delete.each do |file|
@@ -71,7 +89,7 @@ module PeopleGroup
71
89
  @client.create_commit(project_id, branch_name, commit_message, actions)
72
90
 
73
91
  options = { source_branch: branch_name, target_branch: 'master', remove_source_branch: true }
74
- options[:description] = description if description.present?
92
+ options[:description] = description if description
75
93
  @client.create_merge_request(project_id, commit_message, options)
76
94
  end
77
95
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module PeopleGroup
4
4
  module Connectors
5
- VERSION = '0.1.10'
5
+ VERSION = '0.1.11'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peoplegroup-connectors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - lien van den steen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-03 00:00:00.000000000 Z
11
+ date: 2021-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gitlab