Sha256: ac1482d5296676985f225538abbe4c363e2d56068bd75ec6c4f1068618b2c7b1

Contents?: true

Size: 662 Bytes

Versions: 8

Compression:

Stored size: 662 Bytes

Contents

# frozen_string_literal: true

require "open3"

module Git
  module Lint
    module Commits
      module Systems
        # Provides Netlify CI build environment feature branch information.
        class NetlifyCI
          include Git::Lint::Import[:repository, :executor, :environment]

          def call
            executor.capture3 "git remote add -f origin #{environment["REPOSITORY_URL"]}"
            executor.capture3 "git fetch origin #{name}:#{name}"
            repository.commits "origin/#{repository.branch_default}..origin/#{name}"
          end

          private

          def name = environment["HEAD"]
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
git-lint-4.6.0 lib/git/lint/commits/systems/netlify_ci.rb
git-lint-4.5.0 lib/git/lint/commits/systems/netlify_ci.rb
git-lint-4.4.0 lib/git/lint/commits/systems/netlify_ci.rb
git-lint-4.3.0 lib/git/lint/commits/systems/netlify_ci.rb
git-lint-4.2.0 lib/git/lint/commits/systems/netlify_ci.rb
git-lint-4.1.0 lib/git/lint/commits/systems/netlify_ci.rb
git-lint-4.0.1 lib/git/lint/commits/systems/netlify_ci.rb
git-lint-4.0.0 lib/git/lint/commits/systems/netlify_ci.rb