dependabot-common 0.180.4 → 0.180.5

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: 69c13790844f3adc89fca6098d10347c8cbc3b107cba4fd5c79d97ae6f95da72
4
- data.tar.gz: c1cf5f0b739777e8e32aea9fcf8ff94091855ef476d764d9c9e7e58b2f1630b9
3
+ metadata.gz: e96320c0d005a01e60eb0dbda0ecbef317564c601ea749f2e7161f5078af74c7
4
+ data.tar.gz: 55fede508dc3d1e527d82565a5a3516fe618645e106d4bec9821e1216d8d87d5
5
5
  SHA512:
6
- metadata.gz: 97ef272ff9eb8e81378a1b194bd6248fc24f4c583f76a2e18bd4c665d5509a9f373e7f68587b429cd38f384065d4ea27573bcbe077921d34a52f6d27bc87cc9d
7
- data.tar.gz: 1419172a90084a996e486ad4a5269507ffa0bffa8b6bd38eed62f19f0916ba7e4a6ce834de00ae2e296f2ddca3fbaa4db67f6eef5846b6404a9a9eb03cd49704
6
+ metadata.gz: f833e1abb07f8feb45f08c0c9bf6601a612cca37d5e61b6e2a8be5f4e72987dcc37669b6313428dfb7ece40f59c420c6bf923e152d2bc52be93eec97213cd2d0
7
+ data.tar.gz: 55f7f4c31e3caf18f4b3c9897dee9b9edfbd2c71616516411022902fefa30ee63a15d0fa0ab07bf8105178d323c41ea657397b8eea589ecad672b4599df67678
@@ -5,10 +5,16 @@ require "octokit"
5
5
  module Dependabot
6
6
  module Clients
7
7
  class GithubWithRetries
8
+ DEFAULT_OPEN_TIMEOUT_IN_SECONDS = 2
9
+
10
+ def self.open_timeout_in_seconds
11
+ ENV.fetch("DEPENDABOT_OPEN_TIMEOUT_IN_SECONDS", DEFAULT_OPEN_TIMEOUT_IN_SECONDS).to_i
12
+ end
13
+
8
14
  DEFAULT_CLIENT_ARGS = {
9
15
  connection_options: {
10
16
  request: {
11
- open_timeout: 2,
17
+ open_timeout: open_timeout_in_seconds,
12
18
  timeout: 5
13
19
  }
14
20
  }
@@ -50,7 +50,7 @@ module Dependabot
50
50
  return true if dependency.version&.start_with?(ref)
51
51
 
52
52
  # Check the specified `ref` isn't actually a branch
53
- !local_upload_pack.match?("refs/heads/#{ref}")
53
+ !local_upload_pack.match?(%r{ refs/heads/#{ref}$})
54
54
  end
55
55
 
56
56
  def pinned_ref_looks_like_version?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.180.4"
4
+ VERSION = "0.180.5"
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.180.4
4
+ version: 0.180.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-06 00:00:00.000000000 Z
11
+ date: 2022-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport