dependabot-common 0.285.0 → 0.287.0

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: f715ae3932ff54488335714eca22437b802ffe69591bd5e82804ec1b517bc47e
4
- data.tar.gz: 8bc3dbb798980775b4fa8f091d00bd4687ae323d41d766ee887bae09b0d995e2
3
+ metadata.gz: 29a554da8bfe1c29b45541c68eb5c311d1631785725e63d84d9a6d6952324c39
4
+ data.tar.gz: 6aece2522be172f7bc1cb521210121fbe66a21509c9181239b6ed6166df41735
5
5
  SHA512:
6
- metadata.gz: 91d44bfa9b54c64c11509458bc3414052308ac9ed527c3f15dbc3da25bb314ce9f04712195ebe0cd9116d390f29fa53cfabac0f35a1d5c844362ca1e3f6802bf
7
- data.tar.gz: 9309be975505a43f6d2182b1cb992367b1d79d4e4fcc1a9eb1458442d8c6749e65e8f71b24efa09c23faba4300dc818053d35e5724ca8c7e5adb6383eeabffe4
6
+ metadata.gz: 8a5c341db6ff520a170163ab9886c897be6f33f144451d7f79fa2f4adddb44038a8eb616320e39e28bc4306d86222e20f9337125c8adb7577c3acfc085fb7802
7
+ data.tar.gz: 55187173f82cea30b99fbc01418d44ea2b570ef7d88db7a15a85950c00dbe7798c66163d4530a6c053c60fb65e32e2c0f317f090fcf589211d7d31371621d0be
@@ -114,15 +114,15 @@ module Dependabot
114
114
  "Initiating Github pull request."
115
115
  )
116
116
 
117
- if experiment_duplicate_branch? && branch_exists?(branch_name)
117
+ if experiment_duplicate_branch? && branch_exists?(branch_name) && no_pull_request_exists?
118
118
  Dependabot.logger.info(
119
119
  "Existing branch \"#{branch_name}\" found. Pull request not created."
120
120
  )
121
121
  raise BranchAlreadyExists, "Duplicate branch #{branch_name} already exists"
122
122
  end
123
123
 
124
- if branch_exists?(branch_name) && unmerged_pull_request_exists?
125
- raise UnmergedPRExists, "PR ##{unmerged_pull_requests.first.number} already exists"
124
+ if branch_exists?(branch_name) && open_pull_request_exists?
125
+ raise UnmergedPRExists, "PR ##{open_pull_requests.first.number} already exists"
126
126
  end
127
127
  if require_up_to_date_base? && !base_commit_is_up_to_date?
128
128
  raise BaseCommitNotUpToDate, "HEAD #{head_commit} does not match base #{base_commit}"
@@ -164,13 +164,18 @@ module Dependabot
164
164
  # rubocop:enable Metrics/PerceivedComplexity
165
165
 
166
166
  sig { returns(T::Boolean) }
167
- def unmerged_pull_request_exists?
168
- unmerged_pull_requests.any?
167
+ def no_pull_request_exists?
168
+ pull_requests_for_branch.none?
169
+ end
170
+
171
+ sig { returns(T::Boolean) }
172
+ def open_pull_request_exists?
173
+ open_pull_requests.any?
169
174
  end
170
175
 
171
176
  sig { returns(T::Array[T.untyped]) }
172
- def unmerged_pull_requests
173
- pull_requests_for_branch.reject(&:merged)
177
+ def open_pull_requests
178
+ pull_requests_for_branch.reject(&:closed).reject(&:merged)
174
179
  end
175
180
 
176
181
  sig { returns(T::Array[T.untyped]) }
@@ -29,7 +29,7 @@ module Dependabot
29
29
  end
30
30
 
31
31
  # Returns the highest lower limit among all minimum constraints.
32
- sig { returns(T.nilable(Gem::Version)) }
32
+ sig { returns(T.nilable(Dependabot::Version)) }
33
33
  def min_version
34
34
  # Select constraints with minimum operators
35
35
  min_constraints = requirements.select { |op, _| MINIMUM_OPERATORS.include?(op) }
data/lib/dependabot.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Dependabot
5
- VERSION = "0.285.0"
5
+ VERSION = "0.287.0"
6
6
  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.285.0
4
+ version: 0.287.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-11-07 00:00:00.000000000 Z
11
+ date: 2024-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-codecommit
@@ -614,7 +614,7 @@ licenses:
614
614
  - MIT
615
615
  metadata:
616
616
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
617
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.285.0
617
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.287.0
618
618
  post_install_message:
619
619
  rdoc_options: []
620
620
  require_paths: