dependabot-common 0.112.32 → 0.112.37

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: a78e51c3d204cf2337c5c444c03b88811db1145d21d7869147512446261e661d
4
- data.tar.gz: 9b68fbf315cfbc71672b77e5415e51771b449607de0001daf24f6e4f547d3d45
3
+ metadata.gz: d7430df3fea7dd40e4688df4f0ae33d1ad870fa722f03662ff2c743d45c9efcc
4
+ data.tar.gz: b2646081ac5939afea56a79e87db4bb7fa4c50f603326f53c758f1acae9c32ee
5
5
  SHA512:
6
- metadata.gz: 967b7b6db6731b6966edff912d69be0ddcbe88d4aff4d45cde6f1d662ca45ce2428aaa74e8857b3bda09f7855b7c9385e92a21d5029a31f8b56e859bd3175069
7
- data.tar.gz: 9e012a0ad238a17901d427af8696ecba7c280899cfc0aec2f7cb0e1a11a9f1f451c936b95d6f6ebc417736443c2af20e69a79c541f963d6bb19df5dbf4f6e5d9
6
+ metadata.gz: 4e5c2230afc16c8cf1a0bbce111bf980bddd5eec9318efecaa95107f1b6d2ea571e3323fe23929af37cb65c6ae42fa4ab6a6671eb34f85fdc2ee84869545a24a
7
+ data.tar.gz: f2c387692a362cdb132094a8f1a6d6639b3fbd1c59eb45b92e3f9183440ca2696f411caeed1f80edbbd932d22fbdbd3d034131f611ae3a4aef108fc690e92cac
@@ -98,7 +98,7 @@ module Dependabot
98
98
  attr_reader :source
99
99
 
100
100
  def initialize(source)
101
- @source = source
101
+ @source = source.gsub(%r{(?<=\.fury\.io)/[A-Za-z0-9]{20}(?=/)}, "")
102
102
  msg = "The following source could not be reached as it requires "\
103
103
  "authentication (and any provided details were invalid or lacked "\
104
104
  "the required permissions): #{source}"
@@ -110,7 +110,7 @@ module Dependabot
110
110
  attr_reader :source
111
111
 
112
112
  def initialize(source)
113
- @source = source
113
+ @source = source.gsub(%r{(?<=\.fury\.io)/[A-Za-z0-9]{20}(?=/)}, "")
114
114
  super("The following source timed out: #{source}")
115
115
  end
116
116
  end
@@ -119,7 +119,7 @@ module Dependabot
119
119
  attr_reader :source
120
120
 
121
121
  def initialize(source)
122
- @source = source
122
+ @source = source.gsub(%r{(?<=\.fury\.io)/[A-Za-z0-9]{20}(?=/)}, "")
123
123
  super("Could not verify the SSL certificate for #{source}")
124
124
  end
125
125
  end
@@ -18,7 +18,7 @@ module Dependabot
18
18
  require_relative "commits_finder"
19
19
 
20
20
  # Earlier entries are preferred
21
- CHANGELOG_NAMES = %w(changelog history news changes release).freeze
21
+ CHANGELOG_NAMES = %w(changelog news changes history release).freeze
22
22
 
23
23
  attr_reader :source, :dependency, :credentials, :suggested_changelog_url
24
24
 
@@ -61,7 +61,9 @@ module Dependabot
61
61
  raise(RepoNotFound, source.url) unless repo_exists?
62
62
 
63
63
  retrying ||= false
64
- raise "Unexpected git error!" if retrying
64
+
65
+ msg = "Unexpected git error!\n\n#{e.cause&.class}: #{e.cause&.message}"
66
+ raise msg if retrying
65
67
 
66
68
  retrying = true
67
69
  retry
@@ -258,6 +260,9 @@ module Dependabot
258
260
  team_reviewers: reviewers_hash[:team_reviewers] || []
259
261
  )
260
262
  rescue Octokit::UnprocessableEntity => e
263
+ # Special case GitHub bug for team reviewers
264
+ return if e.message.include?("Could not resolve to a node")
265
+
261
266
  if invalid_reviewer?(e.message)
262
267
  comment_with_invalid_reviewer(pull_request, e.message)
263
268
  return
@@ -168,23 +168,28 @@ module Dependabot
168
168
  end
169
169
 
170
170
  def commit_message
171
- @commit_message ||=
171
+ # Take the commit message from the old commit
172
+ commit_being_updated.message
173
+ end
174
+
175
+ def commit_being_updated
176
+ @commit_being_updated ||=
172
177
  if pull_request.commits == 1
173
178
  github_client_for_source.
174
- git_commit(source.repo, pull_request.head.sha).
175
- message
179
+ git_commit(source.repo, pull_request.head.sha)
176
180
  else
177
181
  author_name = author_details&.fetch(:name, nil) || "dependabot"
178
182
  commits =
179
183
  github_client_for_source.
180
- pull_request_commits(source.repo, pull_request_number)
184
+ pull_request_commits(source.repo, pull_request_number).
185
+ reverse
181
186
 
182
187
  commit =
183
188
  commits.find { |c| c.sha == old_commit } ||
184
189
  commits.find { |c| c.commit.author.name.include?(author_name) } ||
185
190
  commits.first
186
191
 
187
- commit.commit.message
192
+ commit.commit
188
193
  end
189
194
  end
190
195
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.112.32"
4
+ VERSION = "0.112.37"
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.112.32
4
+ version: 0.112.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-02 00:00:00.000000000 Z
11
+ date: 2019-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-ecr