{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/pulls/comments/196861675","pull_request_review_id":130493967,"id":196861675,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Njg2MTY3NQ==","diff_hunk":"@@ -125,6 +138,36 @@ public FlowExecution create(FlowExecutionOwner owner, TaskListener listener,\n         return new CpsFlowExecution(script, false, owner);\n     }\n \n+    private List<String> getCleanRefspecs(List<UserRemoteConfig> userRemoteConfigs){\n+        List<String> refSpecs = new ArrayList<>();\n+\n+        for(UserRemoteConfig urc: userRemoteConfigs)\n+            for(String s: urc.getRefspec().split(\"\\\\+\", 0))\n+                if(!s.equals(\"\"))\n+                    refSpecs.add(s);\n+\n+        for(int i = 0; i < refSpecs.size(); i++)\n+            refSpecs.set(i, refSpecs.get(i).trim());","path":"src/main/java/io/jenkins/plugins/sprp/YAML_FlowDefinition.java","position":null,"original_position":52,"commit_id":"ca44d4c57a5879a8dbf22ee8538db1e62307956e","original_commit_id":"2e420b9108040b9284aa2c925e53cddd48cd8e3a","user":{"login":"gautamabhishek46","id":19909597,"node_id":"MDQ6VXNlcjE5OTA5NTk3","avatar_url":"https://avatars0.githubusercontent.com/u/19909597?v=4","gravatar_id":"","url":"https://api.github.com/users/gautamabhishek46","html_url":"https://github.com/gautamabhishek46","followers_url":"https://api.github.com/users/gautamabhishek46/followers","following_url":"https://api.github.com/users/gautamabhishek46/following{/other_user}","gists_url":"https://api.github.com/users/gautamabhishek46/gists{/gist_id}","starred_url":"https://api.github.com/users/gautamabhishek46/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gautamabhishek46/subscriptions","organizations_url":"https://api.github.com/users/gautamabhishek46/orgs","repos_url":"https://api.github.com/users/gautamabhishek46/repos","events_url":"https://api.github.com/users/gautamabhishek46/events{/privacy}","received_events_url":"https://api.github.com/users/gautamabhishek46/received_events","type":"User","site_admin":false},"body":"Ok, I have tested this thing, and I agree that the second loop in not needed. Hence it has been removed.","created_at":"2018-06-20T16:54:30Z","updated_at":"2018-06-20T16:54:31Z","html_url":"https://github.com/jenkinsci/simple-pull-request-job-plugin/pull/9#discussion_r196861675","pull_request_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/pulls/9","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/pulls/comments/196861675"},"html":{"href":"https://github.com/jenkinsci/simple-pull-request-job-plugin/pull/9#discussion_r196861675"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/pulls/9"}},"in_reply_to_id":196615506},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/pulls/9","id":195372744,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MzcyNzQ0","html_url":"https://github.com/jenkinsci/simple-pull-request-job-plugin/pull/9","diff_url":"https://github.com/jenkinsci/simple-pull-request-job-plugin/pull/9.diff","patch_url":"https://github.com/jenkinsci/simple-pull-request-job-plugin/pull/9.patch","issue_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/issues/9","number":9,"state":"open","locked":false,"title":"Get branch name for PR in a better way","user":{"login":"gautamabhishek46","id":19909597,"node_id":"MDQ6VXNlcjE5OTA5NTk3","avatar_url":"https://avatars0.githubusercontent.com/u/19909597?v=4","gravatar_id":"","url":"https://api.github.com/users/gautamabhishek46","html_url":"https://github.com/gautamabhishek46","followers_url":"https://api.github.com/users/gautamabhishek46/followers","following_url":"https://api.github.com/users/gautamabhishek46/following{/other_user}","gists_url":"https://api.github.com/users/gautamabhishek46/gists{/gist_id}","starred_url":"https://api.github.com/users/gautamabhishek46/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gautamabhishek46/subscriptions","organizations_url":"https://api.github.com/users/gautamabhishek46/orgs","repos_url":"https://api.github.com/users/gautamabhishek46/repos","events_url":"https://api.github.com/users/gautamabhishek46/events{/privacy}","received_events_url":"https://api.github.com/users/gautamabhishek46/received_events","type":"User","site_admin":false},"body":"See [JENKINS-51867](https://issues.jenkins-ci.org/browse/JENKINS-51867)","created_at":"2018-06-17T11:12:10Z","updated_at":"2018-06-20T16:54:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b1247f04bd5a722b09dd83b7220c8c45cc8dcc4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/pulls/9/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/pulls/9/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/issues/9/comments","statuses_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/statuses/ca44d4c57a5879a8dbf22ee8538db1e62307956e","head":{"label":"gautamabhishek46:SnippetGenerator","ref":"SnippetGenerator","sha":"ca44d4c57a5879a8dbf22ee8538db1e62307956e","user":{"login":"gautamabhishek46","id":19909597,"node_id":"MDQ6VXNlcjE5OTA5NTk3","avatar_url":"https://avatars0.githubusercontent.com/u/19909597?v=4","gravatar_id":"","url":"https://api.github.com/users/gautamabhishek46","html_url":"https://github.com/gautamabhishek46","followers_url":"https://api.github.com/users/gautamabhishek46/followers","following_url":"https://api.github.com/users/gautamabhishek46/following{/other_user}","gists_url":"https://api.github.com/users/gautamabhishek46/gists{/gist_id}","starred_url":"https://api.github.com/users/gautamabhishek46/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gautamabhishek46/subscriptions","organizations_url":"https://api.github.com/users/gautamabhishek46/orgs","repos_url":"https://api.github.com/users/gautamabhishek46/repos","events_url":"https://api.github.com/users/gautamabhishek46/events{/privacy}","received_events_url":"https://api.github.com/users/gautamabhishek46/received_events","type":"User","site_admin":false},"repo":{"id":132992196,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI5OTIxOTY=","name":"simple-pull-request-job-plugin","full_name":"gautamabhishek46/simple-pull-request-job-plugin","owner":{"login":"gautamabhishek46","id":19909597,"node_id":"MDQ6VXNlcjE5OTA5NTk3","avatar_url":"https://avatars0.githubusercontent.com/u/19909597?v=4","gravatar_id":"","url":"https://api.github.com/users/gautamabhishek46","html_url":"https://github.com/gautamabhishek46","followers_url":"https://api.github.com/users/gautamabhishek46/followers","following_url":"https://api.github.com/users/gautamabhishek46/following{/other_user}","gists_url":"https://api.github.com/users/gautamabhishek46/gists{/gist_id}","starred_url":"https://api.github.com/users/gautamabhishek46/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gautamabhishek46/subscriptions","organizations_url":"https://api.github.com/users/gautamabhishek46/orgs","repos_url":"https://api.github.com/users/gautamabhishek46/repos","events_url":"https://api.github.com/users/gautamabhishek46/events{/privacy}","received_events_url":"https://api.github.com/users/gautamabhishek46/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gautamabhishek46/simple-pull-request-job-plugin","description":null,"fork":true,"url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin","forks_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/forks","keys_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/teams","hooks_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/hooks","issue_events_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/events","assignees_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/tags","blobs_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/languages","stargazers_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/stargazers","contributors_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/contributors","subscribers_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/subscribers","subscription_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/subscription","commits_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/merges","archive_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/downloads","issues_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/labels{/name}","releases_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/gautamabhishek46/simple-pull-request-job-plugin/deployments","created_at":"2018-05-11T05:10:44Z","updated_at":"2018-05-11T05:10:45Z","pushed_at":"2018-06-20T16:52:17Z","git_url":"git://github.com/gautamabhishek46/simple-pull-request-job-plugin.git","ssh_url":"git@github.com:gautamabhishek46/simple-pull-request-job-plugin.git","clone_url":"https://github.com/gautamabhishek46/simple-pull-request-job-plugin.git","svn_url":"https://github.com/gautamabhishek46/simple-pull-request-job-plugin","homepage":null,"size":134,"stargazers_count":0,"watchers_count":0,"language":null,"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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"4705792fa0fae8f047a7824b40e46c0ef314adcc","user":{"login":"jenkinsci","id":107424,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNzQyNA==","avatar_url":"https://avatars0.githubusercontent.com/u/107424?v=4","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":131205228,"node_id":"MDEwOlJlcG9zaXRvcnkxMzEyMDUyMjg=","name":"simple-pull-request-job-plugin","full_name":"jenkinsci/simple-pull-request-job-plugin","owner":{"login":"jenkinsci","id":107424,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNzQyNA==","avatar_url":"https://avatars0.githubusercontent.com/u/107424?v=4","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/simple-pull-request-job-plugin","description":null,"fork":false,"url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin","forks_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/deployments","created_at":"2018-04-26T20:08:02Z","updated_at":"2018-06-19T21:07:14Z","pushed_at":"2018-06-20T16:52:19Z","git_url":"git://github.com/jenkinsci/simple-pull-request-job-plugin.git","ssh_url":"git@github.com:jenkinsci/simple-pull-request-job-plugin.git","clone_url":"https://github.com/jenkinsci/simple-pull-request-job-plugin.git","svn_url":"https://github.com/jenkinsci/simple-pull-request-job-plugin","homepage":null,"size":127,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":5,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/pulls/9"},"html":{"href":"https://github.com/jenkinsci/simple-pull-request-job-plugin/pull/9"},"issue":{"href":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/issues/9"},"comments":{"href":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/simple-pull-request-job-plugin/statuses/ca44d4c57a5879a8dbf22ee8538db1e62307956e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"gautamabhishek46"}}