lib/octopolo/github/pull_request_creator.rb in octopolo-1.11.4 vs lib/octopolo/github/pull_request_creator.rb in octopolo-1.12.0

- old
+ new

@@ -20,18 +20,32 @@ # Public: Create the pull request # # Returns an array with the first element being the pull request's # number, the second being a Mash of the response from GitHub's API def perform - result = GitHub.create_pull_request(repo_name, destination_branch, source_branch, title, body) + result = GitHub.create_pull_request( + repo_name, + destination_branch, + source_branch, + title, + body, + {draft: draft} + ) # capture the information self.number = result.number self.data = result rescue => e raise CannotCreate, e.message end + # Public: Draft Pull request + # + # Returns a boolean that marks the PR a draft PR + def draft + !options[:skip_draft] + end + # Public: Branch to merge the pull request into # # Returns a String with the branch name def destination_branch options[:destination_branch] || raise(MissingAttribute) @@ -48,10 +62,9 @@ # # Returns Name of template file def renderer_template Renderer::PULL_REQUEST_BODY end - # Public: Temporary file for body editing # # Returns Name of temporary file def body_edit_temp_name