{"action":"created","comment":{"url":"https://api.github.com/repos/vorburger/opendaylight-bot/pulls/comments/191771910","pull_request_review_id":124408964,"id":191771910,"diff_hunk":"@@ -0,0 +1,64 @@\n+/*\n+ * Copyright (c) 2018 Red Hat, Inc. and others. All rights reserved.\n+ *\n+ * This program and the accompanying materials are made available under the\n+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\n+ * and is available at http://www.eclipse.org/legal/epl-v10.html\n+ */\n+package org.opendaylight.bot.Jenkins;\n+\n+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;\n+\n+import java.net.URI;\n+import java.net.URISyntaxException;\n+import java.util.Map;\n+import java.io.IOException;\n+\n+import com.offbytwo.jenkins.JenkinsServer;\n+import com.offbytwo.jenkins.model.JobWithDetails;\n+import com.offbytwo.jenkins.model.Job;\n+\n+import org.opendaylight.bot.BotConfiguration;\n+\n+\n+/**\n+ * Template of Initial Jenkins Client API.\n+ *\n+ * @author Prateek Chanda\n+ */\n+@SuppressFBWarnings({\"NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD\", \"UWF_UNWRITTEN_FIELD\", \"UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD\"})\n+\n+public class Client {\n+\n+    String admin;\n+    String password;\n+    String jobName;\n+    public BotConfiguration botConfiguration;\n+\n+    void getAdmin(String newAdmin) {\n+        botConfiguration.admin = newAdmin;\n+    }\n+\n+    void getPassword(String newPassword) {\n+        botConfiguration.password = newPassword;\n+    }\n+\n+    void getJobname(String newJob) {\n+        jobName = newJob;\n+    }\n+\n+    void buildJob() throws IOException {\n+        try {\n+            URI linkname = new URI(\"http://localhost:8080/jenkins\");\n+            JenkinsServer jenkins = new JenkinsServer(linkname, admin, password);\n+            try {\n+                Map<String, Job> jobs = jenkins.getJobs();\n+                JobWithDetails job = jobs.get(jobName).details();\n+            } catch (IOException ioe) {\n+                ioe.printStackTrace();","path":"bot/src/main/java/org/opendaylight/bot/Client.java","position":58,"original_position":58,"commit_id":"8d9f99907c90c3d704017eb2e78dfe0e586fdbc5","original_commit_id":"8d9f99907c90c3d704017eb2e78dfe0e586fdbc5","user":{"login":"vorburger","id":298598,"avatar_url":"https://avatars2.githubusercontent.com/u/298598?v=4","gravatar_id":"","url":"https://api.github.com/users/vorburger","html_url":"https://github.com/vorburger","followers_url":"https://api.github.com/users/vorburger/followers","following_url":"https://api.github.com/users/vorburger/following{/other_user}","gists_url":"https://api.github.com/users/vorburger/gists{/gist_id}","starred_url":"https://api.github.com/users/vorburger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vorburger/subscriptions","organizations_url":"https://api.github.com/users/vorburger/orgs","repos_url":"https://api.github.com/users/vorburger/repos","events_url":"https://api.github.com/users/vorburger/events{/privacy}","received_events_url":"https://api.github.com/users/vorburger/received_events","type":"User","site_admin":false},"body":"just let this exception propagate with `throws IOException` instead","created_at":"2018-05-30T13:42:20Z","updated_at":"2018-05-30T13:42:21Z","html_url":"https://github.com/vorburger/opendaylight-bot/pull/22#discussion_r191771910","pull_request_url":"https://api.github.com/repos/vorburger/opendaylight-bot/pulls/22","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/vorburger/opendaylight-bot/pulls/comments/191771910"},"html":{"href":"https://github.com/vorburger/opendaylight-bot/pull/22#discussion_r191771910"},"pull_request":{"href":"https://api.github.com/repos/vorburger/opendaylight-bot/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/vorburger/opendaylight-bot/pulls/22","id":191445315,"html_url":"https://github.com/vorburger/opendaylight-bot/pull/22","diff_url":"https://github.com/vorburger/opendaylight-bot/pull/22.diff","patch_url":"https://github.com/vorburger/opendaylight-bot/pull/22.patch","issue_url":"https://api.github.com/repos/vorburger/opendaylight-bot/issues/22","number":22,"state":"open","locked":false,"title":"[WIP] Accessing Jenkins with jenkinsci java client","user":{"login":"prateekiiest","id":16035442,"avatar_url":"https://avatars0.githubusercontent.com/u/16035442?v=4","gravatar_id":"","url":"https://api.github.com/users/prateekiiest","html_url":"https://github.com/prateekiiest","followers_url":"https://api.github.com/users/prateekiiest/followers","following_url":"https://api.github.com/users/prateekiiest/following{/other_user}","gists_url":"https://api.github.com/users/prateekiiest/gists{/gist_id}","starred_url":"https://api.github.com/users/prateekiiest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateekiiest/subscriptions","organizations_url":"https://api.github.com/users/prateekiiest/orgs","repos_url":"https://api.github.com/users/prateekiiest/repos","events_url":"https://api.github.com/users/prateekiiest/events{/privacy}","received_events_url":"https://api.github.com/users/prateekiiest/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-30T13:03:39Z","updated_at":"2018-05-30T13:42:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8af1f970f67579040666dee3f413b1241a8ea96","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/vorburger/opendaylight-bot/pulls/22/commits","review_comments_url":"https://api.github.com/repos/vorburger/opendaylight-bot/pulls/22/comments","review_comment_url":"https://api.github.com/repos/vorburger/opendaylight-bot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vorburger/opendaylight-bot/issues/22/comments","statuses_url":"https://api.github.com/repos/vorburger/opendaylight-bot/statuses/8d9f99907c90c3d704017eb2e78dfe0e586fdbc5","head":{"label":"prateekiiest:patch-3","ref":"patch-3","sha":"8d9f99907c90c3d704017eb2e78dfe0e586fdbc5","user":{"login":"prateekiiest","id":16035442,"avatar_url":"https://avatars0.githubusercontent.com/u/16035442?v=4","gravatar_id":"","url":"https://api.github.com/users/prateekiiest","html_url":"https://github.com/prateekiiest","followers_url":"https://api.github.com/users/prateekiiest/followers","following_url":"https://api.github.com/users/prateekiiest/following{/other_user}","gists_url":"https://api.github.com/users/prateekiiest/gists{/gist_id}","starred_url":"https://api.github.com/users/prateekiiest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateekiiest/subscriptions","organizations_url":"https://api.github.com/users/prateekiiest/orgs","repos_url":"https://api.github.com/users/prateekiiest/repos","events_url":"https://api.github.com/users/prateekiiest/events{/privacy}","received_events_url":"https://api.github.com/users/prateekiiest/received_events","type":"User","site_admin":false},"repo":{"id":133644325,"name":"opendaylight-bot","full_name":"prateekiiest/opendaylight-bot","owner":{"login":"prateekiiest","id":16035442,"avatar_url":"https://avatars0.githubusercontent.com/u/16035442?v=4","gravatar_id":"","url":"https://api.github.com/users/prateekiiest","html_url":"https://github.com/prateekiiest","followers_url":"https://api.github.com/users/prateekiiest/followers","following_url":"https://api.github.com/users/prateekiiest/following{/other_user}","gists_url":"https://api.github.com/users/prateekiiest/gists{/gist_id}","starred_url":"https://api.github.com/users/prateekiiest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateekiiest/subscriptions","organizations_url":"https://api.github.com/users/prateekiiest/orgs","repos_url":"https://api.github.com/users/prateekiiest/repos","events_url":"https://api.github.com/users/prateekiiest/events{/privacy}","received_events_url":"https://api.github.com/users/prateekiiest/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/prateekiiest/opendaylight-bot","description":null,"fork":true,"url":"https://api.github.com/repos/prateekiiest/opendaylight-bot","forks_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/forks","keys_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/teams","hooks_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/hooks","issue_events_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/issues/events{/number}","events_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/events","assignees_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/assignees{/user}","branches_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/branches{/branch}","tags_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/tags","blobs_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/statuses/{sha}","languages_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/languages","stargazers_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/stargazers","contributors_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/contributors","subscribers_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/subscribers","subscription_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/subscription","commits_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/contents/{+path}","compare_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/merges","archive_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/downloads","issues_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/issues{/number}","pulls_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/pulls{/number}","milestones_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/milestones{/number}","notifications_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/labels{/name}","releases_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/releases{/id}","deployments_url":"https://api.github.com/repos/prateekiiest/opendaylight-bot/deployments","created_at":"2018-05-16T09:44:25Z","updated_at":"2018-05-16T09:44:27Z","pushed_at":"2018-05-30T13:07:14Z","git_url":"git://github.com/prateekiiest/opendaylight-bot.git","ssh_url":"git@github.com:prateekiiest/opendaylight-bot.git","clone_url":"https://github.com/prateekiiest/opendaylight-bot.git","svn_url":"https://github.com/prateekiiest/opendaylight-bot","homepage":null,"size":198,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"epl-1.0","name":"Eclipse Public License 1.0","spdx_id":"EPL-1.0","url":"https://api.github.com/licenses/epl-1.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vorburger:master","ref":"master","sha":"822fd444797c68a0c3606eee5c9e781cdf906f9e","user":{"login":"vorburger","id":298598,"avatar_url":"https://avatars2.githubusercontent.com/u/298598?v=4","gravatar_id":"","url":"https://api.github.com/users/vorburger","html_url":"https://github.com/vorburger","followers_url":"https://api.github.com/users/vorburger/followers","following_url":"https://api.github.com/users/vorburger/following{/other_user}","gists_url":"https://api.github.com/users/vorburger/gists{/gist_id}","starred_url":"https://api.github.com/users/vorburger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vorburger/subscriptions","organizations_url":"https://api.github.com/users/vorburger/orgs","repos_url":"https://api.github.com/users/vorburger/repos","events_url":"https://api.github.com/users/vorburger/events{/privacy}","received_events_url":"https://api.github.com/users/vorburger/received_events","type":"User","site_admin":false},"repo":{"id":131450554,"name":"opendaylight-bot","full_name":"vorburger/opendaylight-bot","owner":{"login":"vorburger","id":298598,"avatar_url":"https://avatars2.githubusercontent.com/u/298598?v=4","gravatar_id":"","url":"https://api.github.com/users/vorburger","html_url":"https://github.com/vorburger","followers_url":"https://api.github.com/users/vorburger/followers","following_url":"https://api.github.com/users/vorburger/following{/other_user}","gists_url":"https://api.github.com/users/vorburger/gists{/gist_id}","starred_url":"https://api.github.com/users/vorburger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vorburger/subscriptions","organizations_url":"https://api.github.com/users/vorburger/orgs","repos_url":"https://api.github.com/users/vorburger/repos","events_url":"https://api.github.com/users/vorburger/events{/privacy}","received_events_url":"https://api.github.com/users/vorburger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vorburger/opendaylight-bot","description":null,"fork":false,"url":"https://api.github.com/repos/vorburger/opendaylight-bot","forks_url":"https://api.github.com/repos/vorburger/opendaylight-bot/forks","keys_url":"https://api.github.com/repos/vorburger/opendaylight-bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vorburger/opendaylight-bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vorburger/opendaylight-bot/teams","hooks_url":"https://api.github.com/repos/vorburger/opendaylight-bot/hooks","issue_events_url":"https://api.github.com/repos/vorburger/opendaylight-bot/issues/events{/number}","events_url":"https://api.github.com/repos/vorburger/opendaylight-bot/events","assignees_url":"https://api.github.com/repos/vorburger/opendaylight-bot/assignees{/user}","branches_url":"https://api.github.com/repos/vorburger/opendaylight-bot/branches{/branch}","tags_url":"https://api.github.com/repos/vorburger/opendaylight-bot/tags","blobs_url":"https://api.github.com/repos/vorburger/opendaylight-bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vorburger/opendaylight-bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vorburger/opendaylight-bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/vorburger/opendaylight-bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vorburger/opendaylight-bot/statuses/{sha}","languages_url":"https://api.github.com/repos/vorburger/opendaylight-bot/languages","stargazers_url":"https://api.github.com/repos/vorburger/opendaylight-bot/stargazers","contributors_url":"https://api.github.com/repos/vorburger/opendaylight-bot/contributors","subscribers_url":"https://api.github.com/repos/vorburger/opendaylight-bot/subscribers","subscription_url":"https://api.github.com/repos/vorburger/opendaylight-bot/subscription","commits_url":"https://api.github.com/repos/vorburger/opendaylight-bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/vorburger/opendaylight-bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/vorburger/opendaylight-bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/vorburger/opendaylight-bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/vorburger/opendaylight-bot/contents/{+path}","compare_url":"https://api.github.com/repos/vorburger/opendaylight-bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vorburger/opendaylight-bot/merges","archive_url":"https://api.github.com/repos/vorburger/opendaylight-bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vorburger/opendaylight-bot/downloads","issues_url":"https://api.github.com/repos/vorburger/opendaylight-bot/issues{/number}","pulls_url":"https://api.github.com/repos/vorburger/opendaylight-bot/pulls{/number}","milestones_url":"https://api.github.com/repos/vorburger/opendaylight-bot/milestones{/number}","notifications_url":"https://api.github.com/repos/vorburger/opendaylight-bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vorburger/opendaylight-bot/labels{/name}","releases_url":"https://api.github.com/repos/vorburger/opendaylight-bot/releases{/id}","deployments_url":"https://api.github.com/repos/vorburger/opendaylight-bot/deployments","created_at":"2018-04-28T23:09:39Z","updated_at":"2018-05-29T14:57:53Z","pushed_at":"2018-05-30T13:07:15Z","git_url":"git://github.com/vorburger/opendaylight-bot.git","ssh_url":"git@github.com:vorburger/opendaylight-bot.git","clone_url":"https://github.com/vorburger/opendaylight-bot.git","svn_url":"https://github.com/vorburger/opendaylight-bot","homepage":null,"size":146,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"epl-1.0","name":"Eclipse Public License 1.0","spdx_id":"EPL-1.0","url":"https://api.github.com/licenses/epl-1.0"},"forks":1,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vorburger/opendaylight-bot/pulls/22"},"html":{"href":"https://github.com/vorburger/opendaylight-bot/pull/22"},"issue":{"href":"https://api.github.com/repos/vorburger/opendaylight-bot/issues/22"},"comments":{"href":"https://api.github.com/repos/vorburger/opendaylight-bot/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/vorburger/opendaylight-bot/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/vorburger/opendaylight-bot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vorburger/opendaylight-bot/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/vorburger/opendaylight-bot/statuses/8d9f99907c90c3d704017eb2e78dfe0e586fdbc5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vorburger"}}