lib/atlassian/stash/pull_request.rb in atlassian-stash-0.1.9 vs lib/atlassian/stash/pull_request.rb in atlassian-stash-0.2.0
- old
+ new
@@ -26,15 +26,16 @@
'id' => target,
'repository' => repository
}
@resource = {
'title' => title,
- 'description' => description,
'fromRef' => fromRef,
'toRef' => toRef
}
+ @resource["description"] = description unless description.empty?
+
@resource["reviewers"] = reviewers.collect { |r|
{
'user' => {
'name' => r
}
@@ -71,10 +72,10 @@
req = Net::HTTP::Post.new(uri.query.nil? ? "#{prPath}" : "#{prPath}?#{uri.query}", {'Content-Type' => 'application/json', 'Accept' => 'application/json'})
req.basic_auth username, password
req.body = resource.to_json
http = Net::HTTP.new(uri.host, uri.port, proxy_addr, proxy_port)
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE if @config["ssl_no_verify"]
http.use_ssl = uri.scheme.eql?("https")
response = http.start {|conn| conn.request(req) }
if not response.is_a? Net::HTTPCreated