dependabot-common 0.156.0 → 0.156.5

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: 29784de7cf9f3259f4609baf0c204e2ccda7376442e16f6646f1777666ae4b9d
4
- data.tar.gz: a1f65677de7e75cdd27e2fabebe5cb10ce789674e60e669b996c94c9a1231f70
3
+ metadata.gz: '04196eaeff8bc941ffd504cfbba6c5a3cb5b04b55b3ca7d8f48ca93210873503'
4
+ data.tar.gz: c71029bee9231be559e3e45f017d59d9da2ff1f15a7ecebd88375bff59db8b8c
5
5
  SHA512:
6
- metadata.gz: dcb516edc2caff94638f57d082638c86a148557eba5a7764eb1d6965e0f9f703a8ae747e586cd571da0ed67d8e8b8f04282109927a19ec89d37f9d37142237bb
7
- data.tar.gz: d1892a7de0bef8bd47a50b92561ee72cfa1716ccdae29ca6202b75d862eb2c4293802d5c4778d60420760d5123e2985ecf758d43ee6e34f4f1e4f61db84b7469
6
+ metadata.gz: e124fd94802c5430215bce88b2b1eb9465022364d99b8841dee7c97b55734b18e409ec858c35e15d22b02bde8d97b8200267bc45551a20b7db93e2529862b84a
7
+ data.tar.gz: b1cdebbd613eb84535719fe377ae96cfeaefe74e4970182add66f565b8b659ad81840e285c8876208158b5988c8cec27e4cd8f3de9534372a06a6b59ca6bfe25
@@ -14,6 +14,10 @@ module Dependabot
14
14
 
15
15
  class BadGateway < StandardError; end
16
16
 
17
+ class Unauthorized < StandardError; end
18
+
19
+ class Forbidden < StandardError; end
20
+
17
21
  RETRYABLE_ERRORS = [InternalServerError, BadGateway, ServiceNotAvailable].freeze
18
22
 
19
23
  MAX_PR_DESCRIPTION_LENGTH = 3999
@@ -228,6 +232,8 @@ module Dependabot
228
232
  raise ServiceNotAvailable if response.status == 503
229
233
  end
230
234
 
235
+ raise Unauthorized if response.status == 401
236
+ raise Forbidden if response.status == 403
231
237
  raise NotFound if response.status == 404
232
238
 
233
239
  response
@@ -257,6 +263,8 @@ module Dependabot
257
263
  raise ServiceNotAvailable if response.status == 503
258
264
  end
259
265
 
266
+ raise Unauthorized if response.status == 401
267
+ raise Forbidden if response.status == 403
260
268
  raise NotFound if response.status == 404
261
269
 
262
270
  response
@@ -22,9 +22,8 @@ module Dependabot
22
22
 
23
23
  case source.provider
24
24
  when "github" then "#{source.url}/releases"
25
- when "gitlab" then "#{source.url}/tags"
25
+ when "gitlab", "azure" then "#{source.url}/tags"
26
26
  when "bitbucket" then nil
27
- when "azure" then "#{source.url}/tags"
28
27
  else raise "Unexpected repo provider '#{source.provider}'"
29
28
  end
30
29
  end
@@ -195,9 +194,9 @@ module Dependabot
195
194
 
196
195
  case source.provider
197
196
  when "github" then fetch_github_releases
198
- when "bitbucket" then [] # Bitbucket doesn't support releases
197
+ # Bitbucket doesn't support releases and Azure can't list API for annotated tags
198
+ when "bitbucket", "azure" then []
199
199
  when "gitlab" then fetch_gitlab_releases
200
- when "azure" then [] # Azure can't list API for annotated tags
201
200
  else raise "Unexpected repo provider '#{source.provider}'"
202
201
  end
203
202
  end
@@ -173,7 +173,8 @@ module Dependabot
173
173
 
174
174
  if e.message.match?(/protected branch/i) ||
175
175
  e.message.match?(/not authorized to push/i) ||
176
- e.message.match?(/must not contain merge commits/)
176
+ e.message.match?(/must not contain merge commits/) ||
177
+ e.message.match?(/required status check/i)
177
178
  raise BranchProtected
178
179
  end
179
180
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.156.0"
4
+ VERSION = "0.156.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.156.0
4
+ version: 0.156.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-23 00:00:00.000000000 Z
11
+ date: 2021-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -298,14 +298,14 @@ dependencies:
298
298
  requirements:
299
299
  - - "~>"
300
300
  - !ruby/object:Gem::Version
301
- version: 1.16.0
301
+ version: 1.18.0
302
302
  type: :development
303
303
  prerelease: false
304
304
  version_requirements: !ruby/object:Gem::Requirement
305
305
  requirements:
306
306
  - - "~>"
307
307
  - !ruby/object:Gem::Version
308
- version: 1.16.0
308
+ version: 1.18.0
309
309
  - !ruby/object:Gem::Dependency
310
310
  name: simplecov
311
311
  requirement: !ruby/object:Gem::Requirement