{"action":"created","comment":{"url":"https://api.github.com/repos/project-ncl/pnc/pulls/comments/31613015","id":31613015,"diff_hunk":"@@ -144,4 +170,56 @@ private BuildConfigurationAudited getLatestAuditedBuildConfiguration(Integer bui\n         }\n         return buildConfigRevs.get(0);\n     }\n+    \n+    /*\n+     * TODO: Do not ignore certificates, rather setup servers properly.\n+     */\n+    private void signalBpmEvent(String uri) {\n+        if (bpmConfig == null) {\n+            try {\n+                bpmConfig = new Configuration().getModuleConfig(BpmModuleConfig.class);\n+            } catch (ConfigurationParseException e) {\n+                log.error(\"Error parsing BPM config.\", e);\n+            }\n+        }\n+        \n+        SSLContextBuilder builder = new SSLContextBuilder();\n+        try {\n+            builder.loadTrustMaterial(null, new TrustStrategy() {\n+                @Override\n+                public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {\n+                    return true;\n+                }\n+            });\n+        } catch (NoSuchAlgorithmException | KeyStoreException e1) {\n+            e1.printStackTrace();\n+        }\n+\n+        SSLConnectionSocketFactory sslSF = null;\n+        try {\n+            sslSF = new SSLConnectionSocketFactory(builder.build(), SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);\n+        } catch (KeyManagementException | NoSuchAlgorithmException e1) {\n+            e1.printStackTrace();\n+        }\n+\n+        CloseableHttpClient httpclient = HttpClients.custom().setSSLSocketFactory(sslSF)\n+                .setHostnameVerifier(new AllowAllHostnameVerifier()).build();\n+\n+        HttpPost request = new HttpPost(uri);\n+        request.addHeader(\"Authorization\", getAuthHeader());\n+        log.info(\"Executing request \" + request.getRequestLine());\n+\n+        try (CloseableHttpResponse response = httpclient.execute(request)) {\n+            log.info(response.getStatusLine());\n+            response.close();\n+            httpclient.close();\n+        } catch (IOException e) {\n+            e.printStackTrace();","path":"rest/src/main/java/org/jboss/pnc/rest/trigger/BuildTriggerer.java","position":133,"original_position":133,"commit_id":"f706514d5cd462bdaedee48bd738c35580665cfe","original_commit_id":"f706514d5cd462bdaedee48bd738c35580665cfe","user":{"login":"matejonnet","id":536308,"avatar_url":"https://avatars.githubusercontent.com/u/536308?v=3","gravatar_id":"","url":"https://api.github.com/users/matejonnet","html_url":"https://github.com/matejonnet","followers_url":"https://api.github.com/users/matejonnet/followers","following_url":"https://api.github.com/users/matejonnet/following{/other_user}","gists_url":"https://api.github.com/users/matejonnet/gists{/gist_id}","starred_url":"https://api.github.com/users/matejonnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matejonnet/subscriptions","organizations_url":"https://api.github.com/users/matejonnet/orgs","repos_url":"https://api.github.com/users/matejonnet/repos","events_url":"https://api.github.com/users/matejonnet/events{/privacy}","received_events_url":"https://api.github.com/users/matejonnet/received_events","type":"User","site_admin":false},"body":"+1 for retry in client.","created_at":"2015-06-03T11:13:21Z","updated_at":"2015-06-03T11:13:21Z","html_url":"https://github.com/project-ncl/pnc/pull/362#discussion_r31613015","pull_request_url":"https://api.github.com/repos/project-ncl/pnc/pulls/362","_links":{"self":{"href":"https://api.github.com/repos/project-ncl/pnc/pulls/comments/31613015"},"html":{"href":"https://github.com/project-ncl/pnc/pull/362#discussion_r31613015"},"pull_request":{"href":"https://api.github.com/repos/project-ncl/pnc/pulls/362"}}},"pull_request":{"url":"https://api.github.com/repos/project-ncl/pnc/pulls/362","id":36497426,"html_url":"https://github.com/project-ncl/pnc/pull/362","diff_url":"https://github.com/project-ncl/pnc/pull/362.diff","patch_url":"https://github.com/project-ncl/pnc/pull/362.patch","issue_url":"https://api.github.com/repos/project-ncl/pnc/issues/362","number":362,"state":"closed","locked":false,"title":"BPM Callback with BASIC Auth","user":{"login":"sbunciak","id":1398742,"avatar_url":"https://avatars.githubusercontent.com/u/1398742?v=3","gravatar_id":"","url":"https://api.github.com/users/sbunciak","html_url":"https://github.com/sbunciak","followers_url":"https://api.github.com/users/sbunciak/followers","following_url":"https://api.github.com/users/sbunciak/following{/other_user}","gists_url":"https://api.github.com/users/sbunciak/gists{/gist_id}","starred_url":"https://api.github.com/users/sbunciak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbunciak/subscriptions","organizations_url":"https://api.github.com/users/sbunciak/orgs","repos_url":"https://api.github.com/users/sbunciak/repos","events_url":"https://api.github.com/users/sbunciak/events{/privacy}","received_events_url":"https://api.github.com/users/sbunciak/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-29T11:42:53Z","updated_at":"2015-06-03T11:13:21Z","closed_at":"2015-05-29T12:11:44Z","merged_at":"2015-05-29T12:11:44Z","merge_commit_sha":"f8ce5ed7c76e465492f67d17788c2b94a8cecd53","assignee":{"login":"sbunciak","id":1398742,"avatar_url":"https://avatars.githubusercontent.com/u/1398742?v=3","gravatar_id":"","url":"https://api.github.com/users/sbunciak","html_url":"https://github.com/sbunciak","followers_url":"https://api.github.com/users/sbunciak/followers","following_url":"https://api.github.com/users/sbunciak/following{/other_user}","gists_url":"https://api.github.com/users/sbunciak/gists{/gist_id}","starred_url":"https://api.github.com/users/sbunciak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbunciak/subscriptions","organizations_url":"https://api.github.com/users/sbunciak/orgs","repos_url":"https://api.github.com/users/sbunciak/repos","events_url":"https://api.github.com/users/sbunciak/events{/privacy}","received_events_url":"https://api.github.com/users/sbunciak/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/project-ncl/pnc/pulls/362/commits","review_comments_url":"https://api.github.com/repos/project-ncl/pnc/pulls/362/comments","review_comment_url":"https://api.github.com/repos/project-ncl/pnc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/project-ncl/pnc/issues/362/comments","statuses_url":"https://api.github.com/repos/project-ncl/pnc/statuses/f706514d5cd462bdaedee48bd738c35580665cfe","head":{"label":"sbunciak:basic-auth","ref":"basic-auth","sha":"f706514d5cd462bdaedee48bd738c35580665cfe","user":{"login":"sbunciak","id":1398742,"avatar_url":"https://avatars.githubusercontent.com/u/1398742?v=3","gravatar_id":"","url":"https://api.github.com/users/sbunciak","html_url":"https://github.com/sbunciak","followers_url":"https://api.github.com/users/sbunciak/followers","following_url":"https://api.github.com/users/sbunciak/following{/other_user}","gists_url":"https://api.github.com/users/sbunciak/gists{/gist_id}","starred_url":"https://api.github.com/users/sbunciak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbunciak/subscriptions","organizations_url":"https://api.github.com/users/sbunciak/orgs","repos_url":"https://api.github.com/users/sbunciak/repos","events_url":"https://api.github.com/users/sbunciak/events{/privacy}","received_events_url":"https://api.github.com/users/sbunciak/received_events","type":"User","site_admin":false},"repo":{"id":31759997,"name":"pnc","full_name":"sbunciak/pnc","owner":{"login":"sbunciak","id":1398742,"avatar_url":"https://avatars.githubusercontent.com/u/1398742?v=3","gravatar_id":"","url":"https://api.github.com/users/sbunciak","html_url":"https://github.com/sbunciak","followers_url":"https://api.github.com/users/sbunciak/followers","following_url":"https://api.github.com/users/sbunciak/following{/other_user}","gists_url":"https://api.github.com/users/sbunciak/gists{/gist_id}","starred_url":"https://api.github.com/users/sbunciak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbunciak/subscriptions","organizations_url":"https://api.github.com/users/sbunciak/orgs","repos_url":"https://api.github.com/users/sbunciak/repos","events_url":"https://api.github.com/users/sbunciak/events{/privacy}","received_events_url":"https://api.github.com/users/sbunciak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sbunciak/pnc","description":"","fork":true,"url":"https://api.github.com/repos/sbunciak/pnc","forks_url":"https://api.github.com/repos/sbunciak/pnc/forks","keys_url":"https://api.github.com/repos/sbunciak/pnc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sbunciak/pnc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sbunciak/pnc/teams","hooks_url":"https://api.github.com/repos/sbunciak/pnc/hooks","issue_events_url":"https://api.github.com/repos/sbunciak/pnc/issues/events{/number}","events_url":"https://api.github.com/repos/sbunciak/pnc/events","assignees_url":"https://api.github.com/repos/sbunciak/pnc/assignees{/user}","branches_url":"https://api.github.com/repos/sbunciak/pnc/branches{/branch}","tags_url":"https://api.github.com/repos/sbunciak/pnc/tags","blobs_url":"https://api.github.com/repos/sbunciak/pnc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sbunciak/pnc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sbunciak/pnc/git/refs{/sha}","trees_url":"https://api.github.com/repos/sbunciak/pnc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sbunciak/pnc/statuses/{sha}","languages_url":"https://api.github.com/repos/sbunciak/pnc/languages","stargazers_url":"https://api.github.com/repos/sbunciak/pnc/stargazers","contributors_url":"https://api.github.com/repos/sbunciak/pnc/contributors","subscribers_url":"https://api.github.com/repos/sbunciak/pnc/subscribers","subscription_url":"https://api.github.com/repos/sbunciak/pnc/subscription","commits_url":"https://api.github.com/repos/sbunciak/pnc/commits{/sha}","git_commits_url":"https://api.github.com/repos/sbunciak/pnc/git/commits{/sha}","comments_url":"https://api.github.com/repos/sbunciak/pnc/comments{/number}","issue_comment_url":"https://api.github.com/repos/sbunciak/pnc/issues/comments{/number}","contents_url":"https://api.github.com/repos/sbunciak/pnc/contents/{+path}","compare_url":"https://api.github.com/repos/sbunciak/pnc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sbunciak/pnc/merges","archive_url":"https://api.github.com/repos/sbunciak/pnc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sbunciak/pnc/downloads","issues_url":"https://api.github.com/repos/sbunciak/pnc/issues{/number}","pulls_url":"https://api.github.com/repos/sbunciak/pnc/pulls{/number}","milestones_url":"https://api.github.com/repos/sbunciak/pnc/milestones{/number}","notifications_url":"https://api.github.com/repos/sbunciak/pnc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sbunciak/pnc/labels{/name}","releases_url":"https://api.github.com/repos/sbunciak/pnc/releases{/id}","created_at":"2015-03-06T08:34:04Z","updated_at":"2015-05-06T09:11:23Z","pushed_at":"2015-06-03T09:53:40Z","git_url":"git://github.com/sbunciak/pnc.git","ssh_url":"git@github.com:sbunciak/pnc.git","clone_url":"https://github.com/sbunciak/pnc.git","svn_url":"https://github.com/sbunciak/pnc","homepage":null,"size":5517,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"project-ncl:master","ref":"master","sha":"4b076da95116d14ed76f20c837ac358e2d47ec24","user":{"login":"project-ncl","id":9921139,"avatar_url":"https://avatars.githubusercontent.com/u/9921139?v=3","gravatar_id":"","url":"https://api.github.com/users/project-ncl","html_url":"https://github.com/project-ncl","followers_url":"https://api.github.com/users/project-ncl/followers","following_url":"https://api.github.com/users/project-ncl/following{/other_user}","gists_url":"https://api.github.com/users/project-ncl/gists{/gist_id}","starred_url":"https://api.github.com/users/project-ncl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-ncl/subscriptions","organizations_url":"https://api.github.com/users/project-ncl/orgs","repos_url":"https://api.github.com/users/project-ncl/repos","events_url":"https://api.github.com/users/project-ncl/events{/privacy}","received_events_url":"https://api.github.com/users/project-ncl/received_events","type":"Organization","site_admin":false},"repo":{"id":27052762,"name":"pnc","full_name":"project-ncl/pnc","owner":{"login":"project-ncl","id":9921139,"avatar_url":"https://avatars.githubusercontent.com/u/9921139?v=3","gravatar_id":"","url":"https://api.github.com/users/project-ncl","html_url":"https://github.com/project-ncl","followers_url":"https://api.github.com/users/project-ncl/followers","following_url":"https://api.github.com/users/project-ncl/following{/other_user}","gists_url":"https://api.github.com/users/project-ncl/gists{/gist_id}","starred_url":"https://api.github.com/users/project-ncl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-ncl/subscriptions","organizations_url":"https://api.github.com/users/project-ncl/orgs","repos_url":"https://api.github.com/users/project-ncl/repos","events_url":"https://api.github.com/users/project-ncl/events{/privacy}","received_events_url":"https://api.github.com/users/project-ncl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/project-ncl/pnc","description":"System for managing, executing, and tracking builds","fork":false,"url":"https://api.github.com/repos/project-ncl/pnc","forks_url":"https://api.github.com/repos/project-ncl/pnc/forks","keys_url":"https://api.github.com/repos/project-ncl/pnc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project-ncl/pnc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project-ncl/pnc/teams","hooks_url":"https://api.github.com/repos/project-ncl/pnc/hooks","issue_events_url":"https://api.github.com/repos/project-ncl/pnc/issues/events{/number}","events_url":"https://api.github.com/repos/project-ncl/pnc/events","assignees_url":"https://api.github.com/repos/project-ncl/pnc/assignees{/user}","branches_url":"https://api.github.com/repos/project-ncl/pnc/branches{/branch}","tags_url":"https://api.github.com/repos/project-ncl/pnc/tags","blobs_url":"https://api.github.com/repos/project-ncl/pnc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project-ncl/pnc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project-ncl/pnc/git/refs{/sha}","trees_url":"https://api.github.com/repos/project-ncl/pnc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project-ncl/pnc/statuses/{sha}","languages_url":"https://api.github.com/repos/project-ncl/pnc/languages","stargazers_url":"https://api.github.com/repos/project-ncl/pnc/stargazers","contributors_url":"https://api.github.com/repos/project-ncl/pnc/contributors","subscribers_url":"https://api.github.com/repos/project-ncl/pnc/subscribers","subscription_url":"https://api.github.com/repos/project-ncl/pnc/subscription","commits_url":"https://api.github.com/repos/project-ncl/pnc/commits{/sha}","git_commits_url":"https://api.github.com/repos/project-ncl/pnc/git/commits{/sha}","comments_url":"https://api.github.com/repos/project-ncl/pnc/comments{/number}","issue_comment_url":"https://api.github.com/repos/project-ncl/pnc/issues/comments{/number}","contents_url":"https://api.github.com/repos/project-ncl/pnc/contents/{+path}","compare_url":"https://api.github.com/repos/project-ncl/pnc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project-ncl/pnc/merges","archive_url":"https://api.github.com/repos/project-ncl/pnc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project-ncl/pnc/downloads","issues_url":"https://api.github.com/repos/project-ncl/pnc/issues{/number}","pulls_url":"https://api.github.com/repos/project-ncl/pnc/pulls{/number}","milestones_url":"https://api.github.com/repos/project-ncl/pnc/milestones{/number}","notifications_url":"https://api.github.com/repos/project-ncl/pnc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project-ncl/pnc/labels{/name}","releases_url":"https://api.github.com/repos/project-ncl/pnc/releases{/id}","created_at":"2014-11-23T23:43:43Z","updated_at":"2015-06-03T10:44:05Z","pushed_at":"2015-06-03T09:41:36Z","git_url":"git://github.com/project-ncl/pnc.git","ssh_url":"git@github.com:project-ncl/pnc.git","clone_url":"https://github.com/project-ncl/pnc.git","svn_url":"https://github.com/project-ncl/pnc","homepage":"","size":9709,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":1,"forks":21,"open_issues":1,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/project-ncl/pnc/pulls/362"},"html":{"href":"https://github.com/project-ncl/pnc/pull/362"},"issue":{"href":"https://api.github.com/repos/project-ncl/pnc/issues/362"},"comments":{"href":"https://api.github.com/repos/project-ncl/pnc/issues/362/comments"},"review_comments":{"href":"https://api.github.com/repos/project-ncl/pnc/pulls/362/comments"},"review_comment":{"href":"https://api.github.com/repos/project-ncl/pnc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/project-ncl/pnc/pulls/362/commits"},"statuses":{"href":"https://api.github.com/repos/project-ncl/pnc/statuses/f706514d5cd462bdaedee48bd738c35580665cfe"}}}}