dependabot-common 0.201.1 → 0.204.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46903b68cc8671c6f2b3af7cca55681afa29cbfec4fa1106f26c2a6d15d8e551
|
4
|
+
data.tar.gz: f3ef79e50ac2d5e57c8df93cc631df01b75974f07cfcc48024f53974ed36f93b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddebe2354c01cd9f1556c7d78718bc57702dac0fa7e83f84167b5598ba735062f4d32d3ad41a4043098b19716ebdc8c9b4b1e4e03f84b362dd3763baa94eb578
|
7
|
+
data.tar.gz: da0c796c9e2eda0197d366ece46d792549eb2a4cfeeab7b5baa9a734d1938c8d3ee18e5a18b2f1ad97f29e011b5ca2516c62650dd68419a58274449cb8ab0eeb
|
@@ -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
|
-
|
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
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
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
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
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
|
78
|
-
|
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
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
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
|
data/lib/dependabot/source.rb
CHANGED
@@ -21,8 +21,8 @@ module Dependabot
|
|
21
21
|
GITLAB_SOURCE = %r{
|
22
22
|
(?<provider>gitlab)
|
23
23
|
(?:\.com)[/:]
|
24
|
-
(?<repo>
|
25
|
-
(?:(?:/tree|/blob)/(?<branch>[^/]+)/(?<directory>.*)[\#|/])
|
24
|
+
(?<repo>(?!\.git|/tree|/blob)[\w./-]+?)(?:\.git)?
|
25
|
+
(?:(?:/tree|/blob)/(?<branch>[^/]+)/(?<directory>.*)[\#|/].*)?$
|
26
26
|
}x.freeze
|
27
27
|
|
28
28
|
BITBUCKET_SOURCE = %r{
|
data/lib/dependabot/version.rb
CHANGED
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.
|
4
|
+
version: 0.204.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-
|
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:
|
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:
|
142
|
+
version: 2.3.0
|
143
143
|
- !ruby/object:Gem::Dependency
|
144
144
|
name: gitlab
|
145
145
|
requirement: !ruby/object:Gem::Requirement
|