watson-ruby icon indicating copy to clipboard operation
watson-ruby copied to clipboard

Only give relative path for privacy when posted [lib/watson/bitbucket.rb]

Open nhmood opened this issue 11 years ago • 0 comments

filename : lib/watson/bitbucket.rb line # : 333 tag : review md5 : b6c50191344a9be3e454e249d73a84d9

# [review] - Only give relative path for privacy when posted
_body = "__filename__ : #{ issue[:path] }  \n" +
        "__line #__ : #{ issue[:line_number] }  \n" + 
        "__tag__ : #{ issue[:tag] }  \n" +
        "__md5__ : #{ issue[:md5] }  \n\n" +
        "#{ issue[:context].join }"

# Create option hash to pass to Remote::http_call
# Issues URL for GitHub + SSL
# No tag or label concept in Bitbucket unfortunately :(
opts = {:url        => "https://bitbucket.org/api/1.0/repositories/#{ config.bitbucket_api }/#{ config.bitbucket_repo }/issues",
        :ssl        => true,
        :method     => "POST",
        :basic_auth => [config.bitbucket_api, config.bitbucket_pw],
        :data       => [{"title" => issue[:title] + " [#{ issue[:path] }]",
                        "content" => _body }],
        :verbose    => false 

nhmood avatar Nov 21 '13 16:11 nhmood