dependabot-common 0.97.2 → 0.97.3

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: 400377836ff3b569608132740fa427f0fbbfea100c2d51c937f5b629691830b2
4
- data.tar.gz: ad54c7f57a344383e2753c69489652b583bdac3429cc79c15f46809ce8e70f09
3
+ metadata.gz: e9140696bdfbd5b096f0af13e14f823b63a727f47843ad755b0cc451e4a5d285
4
+ data.tar.gz: '00831f5ca91b7682dbe3e82700d27a9db8d46750d4abb3d8ab754d324064d65a'
5
5
  SHA512:
6
- metadata.gz: b13c39e10ab6e5850a40280eb2cf689c3a1c975b86cb36fe328af1b5878f92eff68c6ac4acc6ab350a6744a41b6369355bc9ee7db84e48ce0b4efbf74736df1c
7
- data.tar.gz: c67044e225e16b27eac480506915421a8d4f7dec937901ad3cef087272e5ad24079078ea024cbf92dc3915f5b5b8c96a05221a14d9e06aadd0d25f7225d84a77
6
+ metadata.gz: ffbcca4b1e8998e628f420cfe37ef5cdfd29b3b23ef6a7aeff99e17964502aa6615015900c6d4b70dad69ce74773e8227421fe1dbc0b342da14a9f0f0bbc4f50
7
+ data.tar.gz: 9082d967c8890ccc9a908299e63ddee3996b843f0ced26de7c9900c3df6677b8ba36a85c95a401abdc601eada2767790af46044fd67662a4c4f9aac07005db83
@@ -239,6 +239,8 @@ module Dependabot
239
239
  pull_request.number,
240
240
  milestone: milestone
241
241
  )
242
+ rescue Octokit::UnprocessableEntity => error
243
+ raise unless error.message.include?("code: invalid")
242
244
  end
243
245
 
244
246
  def create_pull_request
@@ -166,9 +166,23 @@ module Dependabot
166
166
  "'!#{credential_helper_path} --file=#{Dir.pwd}/git.store'"
167
167
  )
168
168
 
169
+ github_credentials = credentials.
170
+ select { |c| c["type"] == "git_source" }.
171
+ select { |c| c["host"] == "github.com" }
172
+
173
+ # If multiple credentials are specified for github.com, pick the one that
174
+ # *isn't* just an app token (since it must have been added deliberately)
175
+ github_credential =
176
+ github_credentials.find { |c| !c["password"]&.start_with?("v1.") } ||
177
+ github_credentials.first
178
+
179
+ deduped_credentials = credentials -
180
+ github_credentials +
181
+ [github_credential].compact
182
+
169
183
  # Build the content for our credentials file
170
184
  git_store_content = ""
171
- credentials.each do |cred|
185
+ deduped_credentials.each do |cred|
172
186
  next unless cred["type"] == "git_source"
173
187
 
174
188
  authenticated_url =
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.97.2"
4
+ VERSION = "0.97.3"
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.97.2
4
+ version: 0.97.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-07 00:00:00.000000000 Z
11
+ date: 2019-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-ecr