dependabot-common 0.202.0 → 0.203.0

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: a262dc609945c988c2d92b9893b0f675be686f48c2901afe73e510bcf0754142
4
- data.tar.gz: e4fb01e3ef2ec76c70e49cc4a04968251ab088363e8a80905a4d85803b3d3f83
3
+ metadata.gz: 50face4c31cf6a3d4d59bc68f550a63e471f9bdc123eb5745674d5db16329dc2
4
+ data.tar.gz: 8d9726bc4cb44625e2d5506cccace40f5b523a81abbd50651670a3d4284c2fb7
5
5
  SHA512:
6
- metadata.gz: f4854f914e19e1d457f651036611c606fe3aaf5206e3767c3a92daa9e9581feadd20093aa8a09f428a9440514187b494b3ae2a57ff1d032d034c30105b2fa797
7
- data.tar.gz: b57b92d0d42a6223c3b64d4293234cee862c83b60133e27faba3991677f0d2831065859b3f9ed6dd6d45d85e2dfd8c68ccf64b78564432adcb4d34742c19047a
6
+ metadata.gz: c8d9a0df757d61ccba5e21208a714a4985f82f94d376bb2efca5438dbc22cb97fdbe3ae913726ca5a141d548efd01d7eecbad3ff52391dfed27e0815b850e089
7
+ data.tar.gz: e90053b6bd68c411df8890b4681370caa57f9ff666a2bc688e69134df40c8e7d33c622bc1fb54d48104a4a797eb9a8bd21d2f5973df75e8a2f2c68823c39fa9f
@@ -92,34 +92,36 @@ module Dependabot
92
92
  )
93
93
  end
94
94
 
95
- # @param [DependencyFile] file
96
- def file_action(file)
97
- if file.operation == Dependabot::DependencyFile::Operation::DELETE
98
- "delete"
99
- elsif file.operation == Dependabot::DependencyFile::Operation::CREATE
100
- "create"
101
- else
102
- "update"
103
- end
104
- end
105
-
106
95
  def create_commit
107
96
  return create_submodule_update_commit if files.count == 1 && files.first.type == "submodule"
108
97
 
109
- actions = files.map do |file|
98
+ gitlab_client_for_source.create_commit(
99
+ source.repo,
100
+ branch_name,
101
+ commit_message,
102
+ file_actions
103
+ )
104
+ end
105
+
106
+ def file_actions
107
+ files.map do |file|
110
108
  {
111
109
  action: file_action(file),
112
110
  file_path: file.type == "symlink" ? file.symlink_target : file.path,
113
111
  content: file.content
114
112
  }
115
113
  end
114
+ end
116
115
 
117
- gitlab_client_for_source.create_commit(
118
- source.repo,
119
- branch_name,
120
- commit_message,
121
- actions
122
- )
116
+ # @param [DependencyFile] file
117
+ def file_action(file)
118
+ if file.operation == Dependabot::DependencyFile::Operation::DELETE
119
+ "delete"
120
+ elsif file.operation == Dependabot::DependencyFile::Operation::CREATE
121
+ "create"
122
+ else
123
+ "update"
124
+ end
123
125
  end
124
126
 
125
127
  def create_submodule_update_commit
@@ -63,34 +63,36 @@ module Dependabot
63
63
  gitlab_client_for_source.commit(source.repo, old_commit)
64
64
  end
65
65
 
66
- # @param [DependencyFile] file
67
- def file_action(file)
68
- if file.operation == Dependabot::DependencyFile::Operation::DELETE
69
- "delete"
70
- elsif file.operation == Dependabot::DependencyFile::Operation::CREATE
71
- "create"
72
- else
73
- "update"
74
- end
66
+ def create_commit
67
+ gitlab_client_for_source.create_commit(
68
+ source.repo,
69
+ merge_request.source_branch,
70
+ commit_being_updated.title,
71
+ file_actions,
72
+ force: true,
73
+ start_branch: merge_request.target_branch
74
+ )
75
75
  end
76
76
 
77
- def create_commit
78
- actions = files.map do |file|
77
+ def file_actions
78
+ files.map do |file|
79
79
  {
80
80
  action: file_action(file),
81
81
  file_path: file.type == "symlink" ? file.symlink_target : file.path,
82
82
  content: file.content
83
83
  }
84
84
  end
85
+ end
85
86
 
86
- gitlab_client_for_source.create_commit(
87
- source.repo,
88
- merge_request.source_branch,
89
- commit_being_updated.title,
90
- actions,
91
- force: true,
92
- start_branch: merge_request.target_branch
93
- )
87
+ # @param [DependencyFile] file
88
+ def file_action(file)
89
+ if file.operation == Dependabot::DependencyFile::Operation::DELETE
90
+ "delete"
91
+ elsif file.operation == Dependabot::DependencyFile::Operation::CREATE
92
+ "create"
93
+ else
94
+ "update"
95
+ end
94
96
  end
95
97
  end
96
98
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.202.0"
4
+ VERSION = "0.203.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.202.0
4
+ version: 0.203.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-26 00:00:00.000000000 Z
11
+ date: 2022-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -132,14 +132,14 @@ dependencies:
132
132
  requirements:
133
133
  - - '='
134
134
  - !ruby/object:Gem::Version
135
- version: 1.10.0
135
+ version: 2.3.0
136
136
  type: :runtime
137
137
  prerelease: false
138
138
  version_requirements: !ruby/object:Gem::Requirement
139
139
  requirements:
140
140
  - - '='
141
141
  - !ruby/object:Gem::Version
142
- version: 1.10.0
142
+ version: 2.3.0
143
143
  - !ruby/object:Gem::Dependency
144
144
  name: gitlab
145
145
  requirement: !ruby/object:Gem::Requirement