auto_deploy_branch.rb 530 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
# frozen_string_literal: true

module ReleaseTools
  # Represents an auto-deploy branch for purposes of cherry-picking
  class AutoDeployBranch
    attr_reader :version
    attr_reader :branch_name

    def initialize(version, branch_name)
      @version = version
      @branch_name = branch_name
    end

    def exists?
      true
    end

    # Included in cherry-pick summary messages
    def pick_destination
      "`#{branch_name}`"
    end

    def release_issue
      MonthlyIssue.new(version: version)
    end
  end
end