{"action":"created","comment":{"url":"https://api.github.com/repos/drone/drone/pulls/comments/60264302","id":60264302,"diff_hunk":"@@ -0,0 +1,61 @@\n+package bitbucketserver\n+\n+import (\n+\t\"net/http\"\n+\t\"crypto/tls\"\n+\tlog \"github.com/Sirupsen/logrus\"\n+\t\"io/ioutil\"\n+\t\"encoding/pem\"\n+\t\"crypto/x509\"\n+\t\"github.com/mrjones/oauth\"\n+)\n+\n+\n+func NewClient(ConsumerKey string, URL string) *oauth.Consumer{\n+\tprivateKeyFileContents, err := ioutil.ReadFile(\"/private_key.pem\")\n+\tlog.Info(\"Tried to read the key\")","path":"remote/bitbucketserver/client.go","position":16,"original_position":16,"commit_id":"df45c847630e4d54e4d0168364e460d31cf18153","original_commit_id":"df45c847630e4d54e4d0168364e460d31cf18153","user":{"login":"josmo","id":387992,"avatar_url":"https://avatars.githubusercontent.com/u/387992?v=3","gravatar_id":"","url":"https://api.github.com/users/josmo","html_url":"https://github.com/josmo","followers_url":"https://api.github.com/users/josmo/followers","following_url":"https://api.github.com/users/josmo/following{/other_user}","gists_url":"https://api.github.com/users/josmo/gists{/gist_id}","starred_url":"https://api.github.com/users/josmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josmo/subscriptions","organizations_url":"https://api.github.com/users/josmo/orgs","repos_url":"https://api.github.com/users/josmo/repos","events_url":"https://api.github.com/users/josmo/events{/privacy}","received_events_url":"https://api.github.com/users/josmo/received_events","type":"User","site_admin":false},"body":"Yeah sadly on bit bucket server when you're adding an incoming auth you have to add the public key and need the private key to do auth calls :/ ","created_at":"2016-04-19T16:29:55Z","updated_at":"2016-04-19T16:29:55Z","html_url":"https://github.com/drone/drone/pull/1581#discussion_r60264302","pull_request_url":"https://api.github.com/repos/drone/drone/pulls/1581","_links":{"self":{"href":"https://api.github.com/repos/drone/drone/pulls/comments/60264302"},"html":{"href":"https://github.com/drone/drone/pull/1581#discussion_r60264302"},"pull_request":{"href":"https://api.github.com/repos/drone/drone/pulls/1581"}}},"pull_request":{"url":"https://api.github.com/repos/drone/drone/pulls/1581","id":66963508,"html_url":"https://github.com/drone/drone/pull/1581","diff_url":"https://github.com/drone/drone/pull/1581.diff","patch_url":"https://github.com/drone/drone/pull/1581.patch","issue_url":"https://api.github.com/repos/drone/drone/issues/1581","number":1581,"state":"open","locked":false,"title":"Stash/Bitbucket Server initial support","user":{"login":"josmo","id":387992,"avatar_url":"https://avatars.githubusercontent.com/u/387992?v=3","gravatar_id":"","url":"https://api.github.com/users/josmo","html_url":"https://github.com/josmo","followers_url":"https://api.github.com/users/josmo/followers","following_url":"https://api.github.com/users/josmo/following{/other_user}","gists_url":"https://api.github.com/users/josmo/gists{/gist_id}","starred_url":"https://api.github.com/users/josmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josmo/subscriptions","organizations_url":"https://api.github.com/users/josmo/orgs","repos_url":"https://api.github.com/users/josmo/repos","events_url":"https://api.github.com/users/josmo/events{/privacy}","received_events_url":"https://api.github.com/users/josmo/received_events","type":"User","site_admin":false},"body":"This is the first go to get Stash/Bitbucket support working(continuation of https://github.com/drone/drone/pull/567).  The \"happy path\" works and there's a bit of clean up (First time I've written anything in golang) but if folks want to try it out or give some feedback on the dos and don'ts I'll update it.   ","created_at":"2016-04-19T05:48:16Z","updated_at":"2016-04-19T16:29:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/drone/drone/pulls/1581/commits","review_comments_url":"https://api.github.com/repos/drone/drone/pulls/1581/comments","review_comment_url":"https://api.github.com/repos/drone/drone/pulls/comments{/number}","comments_url":"https://api.github.com/repos/drone/drone/issues/1581/comments","statuses_url":"https://api.github.com/repos/drone/drone/statuses/df45c847630e4d54e4d0168364e460d31cf18153","head":{"label":"josmo:bitbucketserver","ref":"bitbucketserver","sha":"df45c847630e4d54e4d0168364e460d31cf18153","user":{"login":"josmo","id":387992,"avatar_url":"https://avatars.githubusercontent.com/u/387992?v=3","gravatar_id":"","url":"https://api.github.com/users/josmo","html_url":"https://github.com/josmo","followers_url":"https://api.github.com/users/josmo/followers","following_url":"https://api.github.com/users/josmo/following{/other_user}","gists_url":"https://api.github.com/users/josmo/gists{/gist_id}","starred_url":"https://api.github.com/users/josmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josmo/subscriptions","organizations_url":"https://api.github.com/users/josmo/orgs","repos_url":"https://api.github.com/users/josmo/repos","events_url":"https://api.github.com/users/josmo/events{/privacy}","received_events_url":"https://api.github.com/users/josmo/received_events","type":"User","site_admin":false},"repo":{"id":55722876,"name":"drone","full_name":"josmo/drone","owner":{"login":"josmo","id":387992,"avatar_url":"https://avatars.githubusercontent.com/u/387992?v=3","gravatar_id":"","url":"https://api.github.com/users/josmo","html_url":"https://github.com/josmo","followers_url":"https://api.github.com/users/josmo/followers","following_url":"https://api.github.com/users/josmo/following{/other_user}","gists_url":"https://api.github.com/users/josmo/gists{/gist_id}","starred_url":"https://api.github.com/users/josmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josmo/subscriptions","organizations_url":"https://api.github.com/users/josmo/orgs","repos_url":"https://api.github.com/users/josmo/repos","events_url":"https://api.github.com/users/josmo/events{/privacy}","received_events_url":"https://api.github.com/users/josmo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/josmo/drone","description":"Drone is a Continuous Delivery platform built on Docker, written in Go","fork":true,"url":"https://api.github.com/repos/josmo/drone","forks_url":"https://api.github.com/repos/josmo/drone/forks","keys_url":"https://api.github.com/repos/josmo/drone/keys{/key_id}","collaborators_url":"https://api.github.com/repos/josmo/drone/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/josmo/drone/teams","hooks_url":"https://api.github.com/repos/josmo/drone/hooks","issue_events_url":"https://api.github.com/repos/josmo/drone/issues/events{/number}","events_url":"https://api.github.com/repos/josmo/drone/events","assignees_url":"https://api.github.com/repos/josmo/drone/assignees{/user}","branches_url":"https://api.github.com/repos/josmo/drone/branches{/branch}","tags_url":"https://api.github.com/repos/josmo/drone/tags","blobs_url":"https://api.github.com/repos/josmo/drone/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/josmo/drone/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/josmo/drone/git/refs{/sha}","trees_url":"https://api.github.com/repos/josmo/drone/git/trees{/sha}","statuses_url":"https://api.github.com/repos/josmo/drone/statuses/{sha}","languages_url":"https://api.github.com/repos/josmo/drone/languages","stargazers_url":"https://api.github.com/repos/josmo/drone/stargazers","contributors_url":"https://api.github.com/repos/josmo/drone/contributors","subscribers_url":"https://api.github.com/repos/josmo/drone/subscribers","subscription_url":"https://api.github.com/repos/josmo/drone/subscription","commits_url":"https://api.github.com/repos/josmo/drone/commits{/sha}","git_commits_url":"https://api.github.com/repos/josmo/drone/git/commits{/sha}","comments_url":"https://api.github.com/repos/josmo/drone/comments{/number}","issue_comment_url":"https://api.github.com/repos/josmo/drone/issues/comments{/number}","contents_url":"https://api.github.com/repos/josmo/drone/contents/{+path}","compare_url":"https://api.github.com/repos/josmo/drone/compare/{base}...{head}","merges_url":"https://api.github.com/repos/josmo/drone/merges","archive_url":"https://api.github.com/repos/josmo/drone/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/josmo/drone/downloads","issues_url":"https://api.github.com/repos/josmo/drone/issues{/number}","pulls_url":"https://api.github.com/repos/josmo/drone/pulls{/number}","milestones_url":"https://api.github.com/repos/josmo/drone/milestones{/number}","notifications_url":"https://api.github.com/repos/josmo/drone/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/josmo/drone/labels{/name}","releases_url":"https://api.github.com/repos/josmo/drone/releases{/id}","deployments_url":"https://api.github.com/repos/josmo/drone/deployments","created_at":"2016-04-07T19:41:16Z","updated_at":"2016-04-07T19:41:17Z","pushed_at":"2016-04-19T16:00:29Z","git_url":"git://github.com/josmo/drone.git","ssh_url":"git@github.com:josmo/drone.git","clone_url":"https://github.com/josmo/drone.git","svn_url":"https://github.com/josmo/drone","homepage":"","size":19424,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"drone:master","ref":"master","sha":"b354b93658718c5c097309a7c98b5c7f5902048a","user":{"login":"drone","id":2181346,"avatar_url":"https://avatars.githubusercontent.com/u/2181346?v=3","gravatar_id":"","url":"https://api.github.com/users/drone","html_url":"https://github.com/drone","followers_url":"https://api.github.com/users/drone/followers","following_url":"https://api.github.com/users/drone/following{/other_user}","gists_url":"https://api.github.com/users/drone/gists{/gist_id}","starred_url":"https://api.github.com/users/drone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drone/subscriptions","organizations_url":"https://api.github.com/users/drone/orgs","repos_url":"https://api.github.com/users/drone/repos","events_url":"https://api.github.com/users/drone/events{/privacy}","received_events_url":"https://api.github.com/users/drone/received_events","type":"Organization","site_admin":false},"repo":{"id":16607898,"name":"drone","full_name":"drone/drone","owner":{"login":"drone","id":2181346,"avatar_url":"https://avatars.githubusercontent.com/u/2181346?v=3","gravatar_id":"","url":"https://api.github.com/users/drone","html_url":"https://github.com/drone","followers_url":"https://api.github.com/users/drone/followers","following_url":"https://api.github.com/users/drone/following{/other_user}","gists_url":"https://api.github.com/users/drone/gists{/gist_id}","starred_url":"https://api.github.com/users/drone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drone/subscriptions","organizations_url":"https://api.github.com/users/drone/orgs","repos_url":"https://api.github.com/users/drone/repos","events_url":"https://api.github.com/users/drone/events{/privacy}","received_events_url":"https://api.github.com/users/drone/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/drone/drone","description":"Drone is a Continuous Delivery platform built on Docker, written in Go","fork":false,"url":"https://api.github.com/repos/drone/drone","forks_url":"https://api.github.com/repos/drone/drone/forks","keys_url":"https://api.github.com/repos/drone/drone/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drone/drone/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drone/drone/teams","hooks_url":"https://api.github.com/repos/drone/drone/hooks","issue_events_url":"https://api.github.com/repos/drone/drone/issues/events{/number}","events_url":"https://api.github.com/repos/drone/drone/events","assignees_url":"https://api.github.com/repos/drone/drone/assignees{/user}","branches_url":"https://api.github.com/repos/drone/drone/branches{/branch}","tags_url":"https://api.github.com/repos/drone/drone/tags","blobs_url":"https://api.github.com/repos/drone/drone/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drone/drone/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drone/drone/git/refs{/sha}","trees_url":"https://api.github.com/repos/drone/drone/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drone/drone/statuses/{sha}","languages_url":"https://api.github.com/repos/drone/drone/languages","stargazers_url":"https://api.github.com/repos/drone/drone/stargazers","contributors_url":"https://api.github.com/repos/drone/drone/contributors","subscribers_url":"https://api.github.com/repos/drone/drone/subscribers","subscription_url":"https://api.github.com/repos/drone/drone/subscription","commits_url":"https://api.github.com/repos/drone/drone/commits{/sha}","git_commits_url":"https://api.github.com/repos/drone/drone/git/commits{/sha}","comments_url":"https://api.github.com/repos/drone/drone/comments{/number}","issue_comment_url":"https://api.github.com/repos/drone/drone/issues/comments{/number}","contents_url":"https://api.github.com/repos/drone/drone/contents/{+path}","compare_url":"https://api.github.com/repos/drone/drone/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drone/drone/merges","archive_url":"https://api.github.com/repos/drone/drone/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drone/drone/downloads","issues_url":"https://api.github.com/repos/drone/drone/issues{/number}","pulls_url":"https://api.github.com/repos/drone/drone/pulls{/number}","milestones_url":"https://api.github.com/repos/drone/drone/milestones{/number}","notifications_url":"https://api.github.com/repos/drone/drone/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drone/drone/labels{/name}","releases_url":"https://api.github.com/repos/drone/drone/releases{/id}","deployments_url":"https://api.github.com/repos/drone/drone/deployments","created_at":"2014-02-07T07:54:44Z","updated_at":"2016-04-19T14:23:13Z","pushed_at":"2016-04-19T05:48:16Z","git_url":"git://github.com/drone/drone.git","ssh_url":"git@github.com:drone/drone.git","clone_url":"https://github.com/drone/drone.git","svn_url":"https://github.com/drone/drone","homepage":"","size":29139,"stargazers_count":6673,"watchers_count":6673,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":762,"mirror_url":null,"open_issues_count":136,"forks":762,"open_issues":136,"watchers":6673,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/drone/drone/pulls/1581"},"html":{"href":"https://github.com/drone/drone/pull/1581"},"issue":{"href":"https://api.github.com/repos/drone/drone/issues/1581"},"comments":{"href":"https://api.github.com/repos/drone/drone/issues/1581/comments"},"review_comments":{"href":"https://api.github.com/repos/drone/drone/pulls/1581/comments"},"review_comment":{"href":"https://api.github.com/repos/drone/drone/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/drone/drone/pulls/1581/commits"},"statuses":{"href":"https://api.github.com/repos/drone/drone/statuses/df45c847630e4d54e4d0168364e460d31cf18153"}}}}