Sha256: b066bb5e71a9576520c234762367f5bd23733bb3a67ce81bb1c6d9fd55ff7a06

Contents?: true

Size: 687 Bytes

Versions: 2

Compression:

Stored size: 687 Bytes

Contents

require_relative "../scripts"
require_relative "../pull_request_merger"

module Octopolo
  module Scripts
    class Deployable
      include CLIWrapper
      include ConfigWrapper

      attr_accessor :pull_request_id

      def self.execute(pull_request_id=nil)
        new(pull_request_id).execute
      end

      def initialize(pull_request_id=nil)
        @pull_request_id = pull_request_id
      end

      # Public: Perform the script
      def execute
        self.pull_request_id ||= cli.prompt("Pull Request ID: ")
        PullRequestMerger.perform Git::DEPLOYABLE_PREFIX, Integer(@pull_request_id), :user_notifications => config.user_notifications
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
octopolo-0.0.2 lib/octopolo/scripts/deployable.rb
octopolo-0.0.1 lib/octopolo/scripts/deployable.rb