dependabot-common 0.107.31 → 0.107.32

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: 5ca84144864b0c601e0a2a23a57310efc89d6485aa3186f071aaf856b15c9294
4
- data.tar.gz: feb77d368230099eca9dd821582636adcb00a9b88151bbfdc174f5f3d7a4d3bb
3
+ metadata.gz: 9fcfa04457b0f1a3fd23abbc15b77849e9a95c6f5df094e0a4f1ed8e53fa7e12
4
+ data.tar.gz: 90f6a14e6d9b939ba380c9c9e7fb5e83047f9e2b70396adf16531de4c19d4683
5
5
  SHA512:
6
- metadata.gz: b9c1b3ca2ebde549f8f4d7b31d09e86bc76b7073ce70378cb53de788bb7eba0a4a06d95d8fd272213f16bf5cb55e39369b702c8138dd6b527274838fdd82fd45
7
- data.tar.gz: 23568043092b9a5e5f7764d861de41990c4db6dd4c358ec36e618b5e1bf6e2f11c7349790d3bc95f2a8af4d99da5ff22bbd0ff7039dee6dfbf96c4d7dba40a06
6
+ metadata.gz: a1dcca8dbbbaf63b2fb83ffcbf09d2e41d4088e07ef9b376ce58269b70cbc42f61e341f4a8ffa9ec08b4adbc95f6c5242bf30a9b7d74da68a231864ec86597b8
7
+ data.tar.gz: e7be8b19879a7ab03b76324cb4b050d9c5526d824d55a7df9bf750d01472d24edd476ff653b2c58097cd6b5f396b5e420b248b7056a9063a95dd23aaaf9d3f96
@@ -4,6 +4,8 @@ require "dependabot/pull_request_updater/github"
4
4
 
5
5
  module Dependabot
6
6
  class PullRequestUpdater
7
+ class BranchProtected < StandardError; end
8
+
7
9
  attr_reader :source, :files, :base_commit, :old_commit, :credentials,
8
10
  :pull_request_number, :author_details, :signature_key
9
11
 
@@ -141,10 +141,11 @@ module Dependabot
141
141
  true
142
142
  )
143
143
  rescue Octokit::UnprocessableEntity => e
144
- # Return quietly if the branch has been deleted, merged or protected
144
+ # Return quietly if the branch has been deleted or merged
145
145
  return nil if e.message.match?(/Reference does not exist/i)
146
146
  return nil if e.message.match?(/Reference cannot be updated/i)
147
- return nil if e.message.match?(/Cannot force\-push to a protected/i)
147
+
148
+ raise BranchProtected if e.message.match?(/force\-push to a protected/i)
148
149
 
149
150
  raise
150
151
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.107.31"
4
+ VERSION = "0.107.32"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.107.31
4
+ version: 0.107.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot