dependabot-maven 0.261.0 → 0.262.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/maven/utils/auth_headers_finder.rb +11 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1df09dc9f5ceb0895f026f04588c24d7958cc7e57103dbec7ca73e0c649a0304
|
4
|
+
data.tar.gz: acc42669c61d27ce811e5d32aa04a601842232832eccf0b45305ab0a9f87f56d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06e8d15c8b1aca615997e4b559488238fe45b6826c6ebdfc4ef90954fec9a62d1b6e452b8a13d15d0564c452768b344db697be362203401a35c1f2abd354fd39
|
7
|
+
data.tar.gz: 0bfedaf05554a4c93f33d7986ccf3db38515a0a05f5337c2de27077e1d1aa44647e1c7cfdc817f9b92dc8b717419ddee32cfc110f46015330815adb66b1530dd
|
@@ -1,14 +1,20 @@
|
|
1
|
-
# typed:
|
1
|
+
# typed: strict
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
+
require "sorbet-runtime"
|
5
|
+
|
4
6
|
module Dependabot
|
5
7
|
module Maven
|
6
8
|
module Utils
|
7
9
|
class AuthHeadersFinder
|
10
|
+
extend T::Sig
|
11
|
+
|
12
|
+
sig { params(credentials: T::Array[Dependabot::Credential]).void }
|
8
13
|
def initialize(credentials)
|
9
14
|
@credentials = credentials
|
10
15
|
end
|
11
16
|
|
17
|
+
sig { params(maven_repo_url: String).returns(T::Hash[String, String]) }
|
12
18
|
def auth_headers(maven_repo_url)
|
13
19
|
cred =
|
14
20
|
credentials.select { |c| c["type"] == "maven_repository" }
|
@@ -28,10 +34,12 @@ module Dependabot
|
|
28
34
|
|
29
35
|
private
|
30
36
|
|
37
|
+
sig { returns(T::Array[Dependabot::Credential]) }
|
31
38
|
attr_reader :credentials
|
32
39
|
|
40
|
+
sig { params(maven_repo_url: T.any(URI::Generic, String)).returns(T::Hash[T.untyped, T.untyped]) }
|
33
41
|
def gitlab_auth_headers(maven_repo_url)
|
34
|
-
return {} unless gitlab_maven_repo?(URI(maven_repo_url).path)
|
42
|
+
return {} unless gitlab_maven_repo?(T.must(URI(maven_repo_url).path))
|
35
43
|
|
36
44
|
cred =
|
37
45
|
credentials.select { |c| c["type"] == "git_source" }
|
@@ -47,6 +55,7 @@ module Dependabot
|
|
47
55
|
{ "Private-Token" => cred.fetch("password") }
|
48
56
|
end
|
49
57
|
|
58
|
+
sig { params(maven_repo_path: String).returns(T::Boolean) }
|
50
59
|
def gitlab_maven_repo?(maven_repo_path)
|
51
60
|
gitlab_maven_repo_reg = %r{^/api/v4.*/packages/maven/?$}
|
52
61
|
maven_repo_path.match?(gitlab_maven_repo_reg)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-maven
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.262.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dependabot-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.262.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.262.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -264,7 +264,7 @@ licenses:
|
|
264
264
|
- MIT
|
265
265
|
metadata:
|
266
266
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
267
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
267
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.262.0
|
268
268
|
post_install_message:
|
269
269
|
rdoc_options: []
|
270
270
|
require_paths:
|