dependabot-common 0.98.31 → 0.98.32
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 +4 -4
- data/lib/dependabot/clients/bitbucket.rb +2 -2
- data/lib/dependabot/clients/github_with_retries.rb +2 -0
- data/lib/dependabot/clients/gitlab_with_retries.rb +3 -3
- data/lib/dependabot/git_metadata_fetcher.rb +1 -1
- data/lib/dependabot/shared_helpers.rb +2 -1
- data/lib/dependabot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 25c0e74464e5a5fc1f0dfe7c799af9939d1636c948d3341413762f9967d7221c
|
|
4
|
+
data.tar.gz: 7b6162eec439ecd50dc0d19cd22b1c5fcd0db850912b1abc79ac35d59e330e2e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 433eb08f26762e5fee3447f759d556aea736fe4061bcd415a38e426d9ead8b92f931c898ab964a6f2761a712d463921c58475076d40992717ed35b9baa2aa963
|
|
7
|
+
data.tar.gz: 9a7c393a0b76f62495248073fe670838d4f7c4663790df128524667ce1e1fc02e9852bcd65471ff087e6ed30b9b697aec9d93e94f6035ee340060956c89207b5
|
|
@@ -80,8 +80,8 @@ module Dependabot
|
|
|
80
80
|
def get(url)
|
|
81
81
|
response = Excon.get(
|
|
82
82
|
url,
|
|
83
|
-
user: credentials&.fetch("username"),
|
|
84
|
-
password: credentials&.fetch("password"),
|
|
83
|
+
user: credentials&.fetch("username", nil),
|
|
84
|
+
password: credentials&.fetch("password", nil),
|
|
85
85
|
idempotent: true,
|
|
86
86
|
**Dependabot::SharedHelpers.excon_defaults
|
|
87
87
|
)
|
|
@@ -30,6 +30,7 @@ module Dependabot
|
|
|
30
30
|
credentials.
|
|
31
31
|
select { |cred| cred["type"] == "git_source" }.
|
|
32
32
|
select { |cred| cred["host"] == source.hostname }.
|
|
33
|
+
select { |cred| cred["password"] }.
|
|
33
34
|
map { |cred| cred.fetch("password") }
|
|
34
35
|
|
|
35
36
|
new(
|
|
@@ -43,6 +44,7 @@ module Dependabot
|
|
|
43
44
|
credentials.
|
|
44
45
|
select { |cred| cred["type"] == "git_source" }.
|
|
45
46
|
select { |cred| cred["host"] == "github.com" }.
|
|
47
|
+
select { |cred| cred["password"] }.
|
|
46
48
|
map { |cred| cred.fetch("password") }
|
|
47
49
|
|
|
48
50
|
new(access_tokens: access_tokens)
|
|
@@ -5,9 +5,7 @@ require "gitlab"
|
|
|
5
5
|
module Dependabot
|
|
6
6
|
module Clients
|
|
7
7
|
class GitlabWithRetries
|
|
8
|
-
RETRYABLE_ERRORS = [
|
|
9
|
-
Gitlab::Error::BadGateway
|
|
10
|
-
].freeze
|
|
8
|
+
RETRYABLE_ERRORS = [Gitlab::Error::BadGateway].freeze
|
|
11
9
|
|
|
12
10
|
#######################
|
|
13
11
|
# Constructor methods #
|
|
@@ -17,6 +15,7 @@ module Dependabot
|
|
|
17
15
|
access_token =
|
|
18
16
|
credentials.
|
|
19
17
|
select { |cred| cred["type"] == "git_source" }.
|
|
18
|
+
select { |cred| cred["password"] }.
|
|
20
19
|
find { |cred| cred["host"] == source.hostname }&.
|
|
21
20
|
fetch("password")
|
|
22
21
|
|
|
@@ -30,6 +29,7 @@ module Dependabot
|
|
|
30
29
|
access_token =
|
|
31
30
|
credentials.
|
|
32
31
|
select { |cred| cred["type"] == "git_source" }.
|
|
32
|
+
select { |cred| cred["password"] }.
|
|
33
33
|
find { |cred| cred["host"] == "gitlab.com" }&.
|
|
34
34
|
fetch("password")
|
|
35
35
|
|
|
@@ -98,7 +98,7 @@ module Dependabot
|
|
|
98
98
|
if bare_uri.match?(%r{[^/]+:[^/]+@})
|
|
99
99
|
# URI already has authentication details
|
|
100
100
|
"https://#{bare_uri}"
|
|
101
|
-
elsif cred
|
|
101
|
+
elsif cred&.fetch("username", nil) && cred&.fetch("password", nil)
|
|
102
102
|
# URI doesn't have authentication details, but we have credentials
|
|
103
103
|
auth_string = "#{cred.fetch('username')}:#{cred.fetch('password')}"
|
|
104
104
|
"https://#{auth_string}@#{bare_uri}"
|
|
@@ -179,7 +179,8 @@ module Dependabot
|
|
|
179
179
|
|
|
180
180
|
github_credentials = credentials.
|
|
181
181
|
select { |c| c["type"] == "git_source" }.
|
|
182
|
-
select { |c| c["host"] == "github.com" }
|
|
182
|
+
select { |c| c["host"] == "github.com" }.
|
|
183
|
+
select { |c| c["password"] || c["username"] }
|
|
183
184
|
|
|
184
185
|
# If multiple credentials are specified for github.com, pick the one that
|
|
185
186
|
# *isn't* just an app token (since it must have been added deliberately)
|
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.98.
|
|
4
|
+
version: 0.98.32
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dependabot
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-03-
|
|
11
|
+
date: 2019-03-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk-ecr
|