lib/octopolo/scripts/pull_request.rb in octopolo-0.2.1 vs lib/octopolo/scripts/pull_request.rb in octopolo-0.3.0
- old
+ new
@@ -14,17 +14,19 @@
attr_accessor :pull_request
attr_accessor :pivotal_ids
attr_accessor :jira_ids
attr_accessor :destination_branch
attr_accessor :label
+ attr_accessor :options
- def self.execute(destination_branch=nil)
- new(destination_branch).execute
+ def self.execute(destination_branch=nil, options={})
+ new(destination_branch, options).execute
end
- def initialize(destination_branch=nil)
+ def initialize(destination_branch=nil, options={})
@destination_branch = destination_branch || default_destination_branch
+ @options = options
end
def default_destination_branch
config.deploy_branch
end
@@ -106,9 +108,10 @@
title: title,
destination_branch: destination_branch,
source_branch: git.current_branch,
pivotal_ids: pivotal_ids,
jira_ids: jira_ids,
+ editor: options[:editor]
}
end
private :pull_request_attributes
# Private: Handle the newly created pull request