dependabot-common 0.106.0 → 0.106.1
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/message_builder.rb +21 -6
- data/lib/dependabot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b31b0680661ebe9ef6238bd5ae83c55811061e8b5f26c0a92e2ccd23044d2748
|
4
|
+
data.tar.gz: 7dbd02cb85054c4f620789eeba1c3dfa2e6a68807e152d6fc541634bfe8a547c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed3126cd30740cad1e848ee6f83308880c786b07e16e483414b0864f2e1d4c264741ad62535c2c983e9ce1ae278e300b369a19e3f37d156abc9380913d056d83
|
7
|
+
data.tar.gz: 8a7ce8d99698e2eea6feafa67c97217edce6241b4d5cec5c52b070b70d21461ee384ced9f53243194886785943a45e7cd0bebda355dd0d35a84429a256b4b4c5
|
@@ -172,8 +172,8 @@ module Dependabot
|
|
172
172
|
# use that as our model for subsequent commits
|
173
173
|
case last_dependabot_commit_style
|
174
174
|
when :gitmoji then "⬆️ "
|
175
|
-
when :
|
176
|
-
when :
|
175
|
+
when :conventional_prefix then "#{last_dependabot_commit_prefix}: "
|
176
|
+
when :conventional_prefix_with_scope
|
177
177
|
scope = dependencies.any?(&:production?) ? "deps" : "deps-dev"
|
178
178
|
"#{last_dependabot_commit_prefix}(#{scope}): "
|
179
179
|
else
|
@@ -197,7 +197,7 @@ module Dependabot
|
|
197
197
|
def capitalize_first_word?
|
198
198
|
case last_dependabot_commit_style
|
199
199
|
when :gitmoji then true
|
200
|
-
when :
|
200
|
+
when :conventional_prefix, :conventional_prefix_with_scope
|
201
201
|
last_dependabot_commit_message.match?(/: (\[Security\] )?(B|U)/)
|
202
202
|
else
|
203
203
|
if using_angular_commit_messages? || using_eslint_commit_messages?
|
@@ -221,6 +221,9 @@ module Dependabot
|
|
221
221
|
elsif using_eslint_commit_messages?
|
222
222
|
# https://eslint.org/docs/developer-guide/contributing/pull-requests
|
223
223
|
"Upgrade: "
|
224
|
+
elsif using_prefixed_commit_messages?
|
225
|
+
# https://eslint.org/docs/developer-guide/contributing/pull-requests
|
226
|
+
"build: "
|
224
227
|
elsif using_gitmoji_commit_messages?
|
225
228
|
"⬆️ "
|
226
229
|
end
|
@@ -230,10 +233,10 @@ module Dependabot
|
|
230
233
|
return unless (msg = last_dependabot_commit_message)
|
231
234
|
|
232
235
|
return :gitmoji if msg.start_with?("⬆️")
|
233
|
-
return :
|
236
|
+
return :conventional_prefix if msg.match?(/^(chore|build|upgrade):/i)
|
234
237
|
return unless msg.match?(/^(chore|build|upgrade)\(/i)
|
235
238
|
|
236
|
-
:
|
239
|
+
:conventional_prefix_with_scope
|
237
240
|
end
|
238
241
|
|
239
242
|
def last_dependabot_commit_prefix
|
@@ -815,6 +818,17 @@ module Dependabot
|
|
815
818
|
semantic_messages.count.to_f / recent_commit_messages.count > 0.3
|
816
819
|
end
|
817
820
|
|
821
|
+
def using_prefixed_commit_messages?
|
822
|
+
return false if using_gitmoji_commit_messages?
|
823
|
+
return false if recent_commit_messages.none?
|
824
|
+
|
825
|
+
prefixed_messages = recent_commit_messages.select do |message|
|
826
|
+
message.start_with?(/[a-z][^\s]+:/)
|
827
|
+
end
|
828
|
+
|
829
|
+
prefixed_messages.count.to_f / recent_commit_messages.count > 0.3
|
830
|
+
end
|
831
|
+
|
818
832
|
def angular_commit_prefix
|
819
833
|
raise "Not using angular commits!" unless using_angular_commit_messages?
|
820
834
|
|
@@ -911,7 +925,8 @@ module Dependabot
|
|
911
925
|
end
|
912
926
|
|
913
927
|
def recent_github_commits
|
914
|
-
@recent_github_commits ||=
|
928
|
+
@recent_github_commits ||=
|
929
|
+
github_client_for_source.commits(source.repo, per_page: 100)
|
915
930
|
rescue Octokit::Conflict
|
916
931
|
@recent_github_commits ||= []
|
917
932
|
end
|
data/lib/dependabot/version.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.106.
|
4
|
+
version: 0.106.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-ecr
|