dependabot-common 0.180.3 → 0.180.4
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 +4 -4
- data/lib/dependabot/git_commit_checker.rb +43 -20
- 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: 69c13790844f3adc89fca6098d10347c8cbc3b107cba4fd5c79d97ae6f95da72
         | 
| 4 | 
            +
              data.tar.gz: c1cf5f0b739777e8e32aea9fcf8ff94091855ef476d764d9c9e7e58b2f1630b9
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 97ef272ff9eb8e81378a1b194bd6248fc24f4c583f76a2e18bd4c665d5509a9f373e7f68587b429cd38f384065d4ea27573bcbe077921d34a52f6d27bc87cc9d
         | 
| 7 | 
            +
              data.tar.gz: 1419172a90084a996e486ad4a5269507ffa0bffa8b6bd38eed62f19f0916ba7e4a6ce834de00ae2e296f2ddca3fbaa4db67f6eef5846b6404a9a9eb03cd49704
         | 
| @@ -86,25 +86,27 @@ module Dependabot | |
| 86 86 | 
             
                  raise Dependabot::GitDependencyReferenceNotFound, dependency.name
         | 
| 87 87 | 
             
                end
         | 
| 88 88 |  | 
| 89 | 
            -
                 | 
| 90 | 
            -
             | 
| 91 | 
            -
             | 
| 92 | 
            -
             | 
| 93 | 
            -
             | 
| 94 | 
            -
             | 
| 95 | 
            -
                   | 
| 96 | 
            -
             | 
| 97 | 
            -
             | 
| 98 | 
            -
             | 
| 99 | 
            -
             | 
| 89 | 
            +
                def local_tags_for_latest_version_commit_sha
         | 
| 90 | 
            +
                  tags = allowed_version_tags
         | 
| 91 | 
            +
                  max_tag = max_version_tag(tags)
         | 
| 92 | 
            +
             | 
| 93 | 
            +
                  return [] unless max_tag
         | 
| 94 | 
            +
             | 
| 95 | 
            +
                  tags.
         | 
| 96 | 
            +
                    select { |t| t.commit_sha == max_tag.commit_sha }.
         | 
| 97 | 
            +
                    map do |t|
         | 
| 98 | 
            +
                      version = t.name.match(VERSION_REGEX).named_captures.fetch("version")
         | 
| 99 | 
            +
                      {
         | 
| 100 | 
            +
                        tag: t.name,
         | 
| 101 | 
            +
                        version: version_class.new(version),
         | 
| 102 | 
            +
                        commit_sha: t.commit_sha,
         | 
| 103 | 
            +
                        tag_sha: t.tag_sha
         | 
| 104 | 
            +
                      }
         | 
| 105 | 
            +
                    end
         | 
| 106 | 
            +
                end
         | 
| 100 107 |  | 
| 101 | 
            -
             | 
| 102 | 
            -
             | 
| 103 | 
            -
                        max_by do |t|
         | 
| 104 | 
            -
                          version = t.name.match(VERSION_REGEX).named_captures.
         | 
| 105 | 
            -
                                    fetch("version")
         | 
| 106 | 
            -
                          version_class.new(version)
         | 
| 107 | 
            -
                        end
         | 
| 108 | 
            +
                def local_tag_for_latest_version
         | 
| 109 | 
            +
                  tag = max_version_tag(allowed_version_tags)
         | 
| 108 110 |  | 
| 109 111 | 
             
                  return unless tag
         | 
| 110 112 |  | 
| @@ -116,8 +118,29 @@ module Dependabot | |
| 116 118 | 
             
                    tag_sha: tag.tag_sha
         | 
| 117 119 | 
             
                  }
         | 
| 118 120 | 
             
                end
         | 
| 119 | 
            -
             | 
| 120 | 
            -
                 | 
| 121 | 
            +
             | 
| 122 | 
            +
                def max_version_tag(tags)
         | 
| 123 | 
            +
                  tags.
         | 
| 124 | 
            +
                    max_by do |t|
         | 
| 125 | 
            +
                    version = t.name.match(VERSION_REGEX).named_captures.
         | 
| 126 | 
            +
                              fetch("version")
         | 
| 127 | 
            +
                    version_class.new(version)
         | 
| 128 | 
            +
                  end
         | 
| 129 | 
            +
                end
         | 
| 130 | 
            +
             | 
| 131 | 
            +
                def allowed_version_tags
         | 
| 132 | 
            +
                  tags =
         | 
| 133 | 
            +
                    local_tags.
         | 
| 134 | 
            +
                    select { |t| version_tag?(t.name) && matches_existing_prefix?(t.name) }
         | 
| 135 | 
            +
                  filtered = tags.
         | 
| 136 | 
            +
                             reject { |t| tag_included_in_ignore_requirements?(t) }
         | 
| 137 | 
            +
                  if @raise_on_ignored && filter_lower_versions(filtered).empty? && filter_lower_versions(tags).any?
         | 
| 138 | 
            +
                    raise Dependabot::AllVersionsIgnored
         | 
| 139 | 
            +
                  end
         | 
| 140 | 
            +
             | 
| 141 | 
            +
                  filtered.
         | 
| 142 | 
            +
                    reject { |t| tag_is_prerelease?(t) && !wants_prerelease? }
         | 
| 143 | 
            +
                end
         | 
| 121 144 |  | 
| 122 145 | 
             
                def current_version
         | 
| 123 146 | 
             
                  return unless dependency.version && version_tag?(dependency.version)
         | 
    
        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.180. | 
| 4 | 
            +
              version: 0.180.4
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Dependabot
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2022-04- | 
| 11 | 
            +
            date: 2022-04-06 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: activesupport
         |