dependabot-common 0.145.3 → 0.145.4

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: e529a98656bc4faab2c6e8e0b27cb487b272f0eb1e7a0a6b24c378917eb7fc0c
4
- data.tar.gz: 1114132591919b93cc7a6ae9abd16f631028f7a6e21c523e0ceef94f4a8ea303
3
+ metadata.gz: ddf544db22f6cd0f186d30314a7f739c307fd39c6d6154ba3e3695707c940479
4
+ data.tar.gz: ea8f1f2404c68e01f90fa382b51994f9bc2d09ed31a01fe527a4acb69843406f
5
5
  SHA512:
6
- metadata.gz: f47c6bcd3b685350199f6d724a711b5cee21375f76b65886550b82e3bd4485f0291807bac563ed24401c168f49b2c2d1da9856eecd8091e00b95030e96f61b78
7
- data.tar.gz: 11f85cb1b184c490be8b969419f7ceedb4c61e9e17792ee077bfac738d1bdc5f4a35145cd17915519cc212c5068789e72c9eb7b95c952f3731ba04ed0cadf546
6
+ metadata.gz: 9467032f9bf7632a832e127f87755103b860725b05d18a6f6d198cd5b265e6f864e21c22d9aeab6bd1bab3328f44f94dfa2507b25a680beae7c3707968b5e0cf
7
+ data.tar.gz: 7f53c347a240b6a4a71bf645c96bd63e6ca5791e11a57eb944f544d8d70b192e679ded0e9e97fdf4b28f4883a2e1a58cd9de232a607222d038d0e13faf73c168
@@ -60,10 +60,10 @@ module Dependabot
60
60
  end
61
61
 
62
62
  def pinned_ref_looks_like_commit_sha?
63
- return false unless pinned?
64
-
65
63
  ref = dependency_source_details.fetch(:ref)
66
- return false unless ref.match?(/^[0-9a-f]{6,40}$/)
64
+ return false unless ref&.match?(/^[0-9a-f]{6,40}$/)
65
+
66
+ return false unless pinned?
67
67
 
68
68
  local_repo_git_metadata_fetcher.head_commit_for_ref(ref).nil?
69
69
  end
@@ -115,6 +115,17 @@ module Dependabot
115
115
  end
116
116
  # rubocop:enable Metrics/PerceivedComplexity
117
117
 
118
+ def local_tag_for_pinned_version
119
+ return unless pinned?
120
+
121
+ ref = dependency_source_details.fetch(:ref)
122
+ tags = local_tags.select { |t| t.commit_sha == ref && version_class.correct?(t.name) }.
123
+ sort_by { |t| version_class.new(t.name) }
124
+ return if tags.empty?
125
+
126
+ tags[-1].name
127
+ end
128
+
118
129
  def git_repo_reachable?
119
130
  local_upload_pack
120
131
  true
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.145.3"
4
+ VERSION = "0.145.4"
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.145.3
4
+ version: 0.145.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-07 00:00:00.000000000 Z
11
+ date: 2021-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport