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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d54136bfb19db965677b1262ba6326101bf5393a3cbd9db2ec4415d67510e570
4
- data.tar.gz: 4baa9d954218bed9dc3ac4072d977202edfd86b8de27e129e8f8ea017d857b92
3
+ metadata.gz: b31b0680661ebe9ef6238bd5ae83c55811061e8b5f26c0a92e2ccd23044d2748
4
+ data.tar.gz: 7dbd02cb85054c4f620789eeba1c3dfa2e6a68807e152d6fc541634bfe8a547c
5
5
  SHA512:
6
- metadata.gz: 6009faa27cfc42b2e4d7f2591e6deb5cc671fea86e0d0c5e534b47b550139e1ff4805b9e5e1bb0b69960d1da6771db70718f261f13701fbd9a1ca78a63d7f69b
7
- data.tar.gz: ce458ad65f9b0564e231fe6186bcd32c62882e2a094e4e00a7164c076be83ec17b1a5f6a755381129ea5c31f85284ed8cb12ae58cf065bab478b7f0f031eb5e0
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 :contentional_prefix then "#{last_dependabot_commit_prefix}: "
176
- when :contentional_prefix_with_scope
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 :contentional_prefix, :contentional_prefix_with_scope
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 :contentional_prefix if msg.match?(/^(chore|build|upgrade):/i)
236
+ return :conventional_prefix if msg.match?(/^(chore|build|upgrade):/i)
234
237
  return unless msg.match?(/^(chore|build|upgrade)\(/i)
235
238
 
236
- :contentional_prefix_with_scope
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 ||= github_client_for_source.commits(source.repo)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.106.0"
4
+ VERSION = "0.106.1"
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.106.0
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-21 00:00:00.000000000 Z
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