dependabot-common 0.98.0 → 0.98.1

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: 2b9715a5eff25d90329037d9795fd5b70caa291b21afb05e391e7afb9a471de4
4
- data.tar.gz: 494ea20c6a9ced844cefae976481e37eec1730e1b259d5b7eb7f599e4f8b72b1
3
+ metadata.gz: af88340953e2c0c2f588be50c2873402ef72c9ef5b967194fdca84f4e3bdc6f2
4
+ data.tar.gz: 9254e40cfb4cecc8f7336b360940bb171a3dcfc050b17beade51ee229ffa7e0a
5
5
  SHA512:
6
- metadata.gz: dbe2142c2fee28dfb359d0e42d994cef1c14ba82d5833281d8ee938dc6ec06172aa67ae5c61d070dcf0951145a1a99becc98d7cbabe9c26a8f5164f50493e39c
7
- data.tar.gz: 86a503b9660278f27fec7ecdb0febceb52ed2d833feefa1e9c11f51dc10a3f438e09f0ce41f7cfce69c11e67bb3797f97d1b6a67f36ce43c0ce698f47b883aa7
6
+ metadata.gz: f38581b3619becfd94601abb326065fca0ca9f1ab06919e32d6a200df70c5c3deece14ea4f72ba9923b295cd2facb2cd4804f0c6507cfbd063e086d4bdb98095
7
+ data.tar.gz: 6003395dd7b980a8887a0a89b97e9be7f69463442e6fc36f7c0517f91bb013c1b7f4c6e39a01bdcdf7e7e406cdb580105f125a09687457bb3b2a2895e8d69251
@@ -26,7 +26,8 @@ module Dependabot
26
26
  "name" => name,
27
27
  "content" => content,
28
28
  "directory" => directory,
29
- "type" => type
29
+ "type" => type,
30
+ "support_file" => support_file
30
31
  }
31
32
  end
32
33
 
@@ -35,7 +36,11 @@ module Dependabot
35
36
  end
36
37
 
37
38
  def ==(other)
38
- other.instance_of?(self.class) && to_h == other.to_h
39
+ return false unless other.instance_of?(self.class)
40
+
41
+ my_hash = to_h.reject { |k| k == "support_file" }
42
+ their_hash = other.to_h.reject { |k| k == "support_file" }
43
+ my_hash == their_hash
39
44
  end
40
45
 
41
46
  def hash
@@ -61,7 +61,7 @@ module Dependabot
61
61
  message = commit_subject + "\n\n"
62
62
  message += commit_message_intro
63
63
  message += metadata_links
64
- message += "\n\n" + signoff_message if signoff_message
64
+ message += "\n\n" + message_trailers if message_trailers
65
65
  message
66
66
  end
67
67
 
@@ -89,6 +89,12 @@ module Dependabot
89
89
  "\n\n#{pr_message_footer}"
90
90
  end
91
91
 
92
+ def message_trailers
93
+ return unless on_behalf_of_message || signoff_message
94
+
95
+ [on_behalf_of_message, signoff_message].compact.join("\n")
96
+ end
97
+
92
98
  def signoff_message
93
99
  return unless author_details.is_a?(Hash)
94
100
  return unless author_details[:name] && author_details[:email]
@@ -96,6 +102,14 @@ module Dependabot
96
102
  "Signed-off-by: #{author_details[:name]} <#{author_details[:email]}>"
97
103
  end
98
104
 
105
+ def on_behalf_of_message
106
+ return unless author_details.is_a?(Hash)
107
+ return unless author_details[:org_name] && author_details[:org_email]
108
+
109
+ "On-behalf-of: @#{author_details[:org_name]} "\
110
+ "<#{author_details[:org_email]}>"
111
+ end
112
+
99
113
  def library_pr_name
100
114
  pr_name = pr_name_prefix
101
115
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.98.0"
4
+ VERSION = "0.98.1"
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.98.0
4
+ version: 0.98.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot