Sha256: a57fd8356a28ca900c39df93fd40e217c3815b92446f29313227272bfeb41930
Contents?: true
Size: 715 Bytes
Versions: 12
Compression:
Stored size: 715 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Commits module Systems # Provides Netlify CI build environment feature branch information. class NetlifyCI include Git::Lint::Import[:git, :environment] def call git.call("remote", "add", "-f", "origin", environment["REPOSITORY_URL"]) .bind { git.call "fetch", "origin", "#{branch_name}:#{branch_name}" } .bind { git.commits "origin/#{branch_default}..origin/#{branch_name}" } end private def branch_default = git.branch_default.value_or nil def branch_name = environment["HEAD"] end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems