dependabot-common 0.286.0 → 0.288.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/pull_request_creator/github.rb +12 -7
- data/lib/dependabot.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 550020f64e127c0aeb071589d9d77b6a9b00bc3c516ce3baecf6f8b072fa2621
|
4
|
+
data.tar.gz: 0f0162b707b4954b8a3f09addb4f5eb1d16f4d3863bb875dd95faee5efb0c2a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 836eb356d0714bff9005c5d83f01f918c722094166df7a0d1c1629c6af484ab600680bd02ebe1b713f6f638d1c3e73ddd02b1ccdb7d16be3b03f25af8a7c04bf
|
7
|
+
data.tar.gz: 95190537ceea2262ced17707f5276931dd1554a92c1478054773a5395317154e6c99243cb048d45aee1377beeb33f556c145e8cd94838075633dc5116cf9800d
|
@@ -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) &&
|
125
|
-
raise UnmergedPRExists, "PR ##{
|
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
|
168
|
-
|
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
|
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]) }
|
data/lib/dependabot.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.
|
4
|
+
version: 0.288.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-
|
11
|
+
date: 2024-11-21 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.
|
617
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.288.0
|
618
618
|
post_install_message:
|
619
619
|
rdoc_options: []
|
620
620
|
require_paths:
|