{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/pulls/comments/79876315","id":79876315,"diff_hunk":"@@ -109,8 +115,12 @@ public String getcredentialsId() {\n \n     private StandardUsernamePasswordCredentials getCredentials() {","path":"src/main/java/stashpullrequestbuilder/stashpullrequestbuilder/StashBuildTrigger.java","position":50,"original_position":50,"commit_id":"b27cc5d3fd043905a4683f63e668c8fd76cf6a96","original_commit_id":"b27cc5d3fd043905a4683f63e668c8fd76cf6a96","user":{"login":"oleg-nenashev","id":3000480,"avatar_url":"https://avatars.githubusercontent.com/u/3000480?v=3","gravatar_id":"","url":"https://api.github.com/users/oleg-nenashev","html_url":"https://github.com/oleg-nenashev","followers_url":"https://api.github.com/users/oleg-nenashev/followers","following_url":"https://api.github.com/users/oleg-nenashev/following{/other_user}","gists_url":"https://api.github.com/users/oleg-nenashev/gists{/gist_id}","starred_url":"https://api.github.com/users/oleg-nenashev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleg-nenashev/subscriptions","organizations_url":"https://api.github.com/users/oleg-nenashev/orgs","repos_url":"https://api.github.com/users/oleg-nenashev/repos","events_url":"https://api.github.com/users/oleg-nenashev/events{/privacy}","received_events_url":"https://api.github.com/users/oleg-nenashev/received_events","type":"User","site_admin":false},"body":"NIT: Would be nice to have annotations if you change the code around","created_at":"2016-09-21T16:32:24Z","updated_at":"2016-09-21T16:32:30Z","html_url":"https://github.com/jenkinsci/stash-pullrequest-builder-plugin/pull/18#discussion_r79876315","pull_request_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/pulls/comments/79876315"},"html":{"href":"https://github.com/jenkinsci/stash-pullrequest-builder-plugin/pull/18#discussion_r79876315"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/pulls/18","id":86196507,"html_url":"https://github.com/jenkinsci/stash-pullrequest-builder-plugin/pull/18","diff_url":"https://github.com/jenkinsci/stash-pullrequest-builder-plugin/pull/18.diff","patch_url":"https://github.com/jenkinsci/stash-pullrequest-builder-plugin/pull/18.patch","issue_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/issues/18","number":18,"state":"open","locked":false,"title":"[JENKINS-37468] Only offer valid credentials in the credentials drop down","user":{"login":"stephenc","id":209336,"avatar_url":"https://avatars.githubusercontent.com/u/209336?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenc","html_url":"https://github.com/stephenc","followers_url":"https://api.github.com/users/stephenc/followers","following_url":"https://api.github.com/users/stephenc/following{/other_user}","gists_url":"https://api.github.com/users/stephenc/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenc/subscriptions","organizations_url":"https://api.github.com/users/stephenc/orgs","repos_url":"https://api.github.com/users/stephenc/repos","events_url":"https://api.github.com/users/stephenc/events{/privacy}","received_events_url":"https://api.github.com/users/stephenc/received_events","type":"User","site_admin":false},"body":"See [JENKINS-37468](https://issues.jenkins-ci.org/browse/JENKINS-37468)\r\n\r\nI feel that the RFE is currently technically impossible as the REST API for query of the pull requests does not provide any support for SSH based authentication.\r\n\r\nAs such the RFE should probably be rejected.\r\n\r\nBehind the RFE however, there is a valid bug. Namely that the drop down of credentials was including all Username based credentials (which would include SSH keys) yet only UsernamePassword credentials were being used.\r\n\r\nThis PR fixes the drop-down population to be restricted to Username Password credentials only.\r\n\r\nAdditionally this PR tidies up some of the usage of credentials (esp with respect to the interactions with the authorize-project plugin) and switches to the more modern APIs for populating drop-down boxes.\r\n\r\n@reviewbybees @jenkinsci/code-reviewers","created_at":"2016-09-21T16:24:38Z","updated_at":"2016-09-21T16:32:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73438031bd00b07b1d2baf1d4b4b685d7b2e9117","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/pulls/18/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/pulls/18/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/issues/18/comments","statuses_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/statuses/b27cc5d3fd043905a4683f63e668c8fd76cf6a96","head":{"label":"stephenc:jenkins-37468","ref":"jenkins-37468","sha":"b27cc5d3fd043905a4683f63e668c8fd76cf6a96","user":{"login":"stephenc","id":209336,"avatar_url":"https://avatars.githubusercontent.com/u/209336?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenc","html_url":"https://github.com/stephenc","followers_url":"https://api.github.com/users/stephenc/followers","following_url":"https://api.github.com/users/stephenc/following{/other_user}","gists_url":"https://api.github.com/users/stephenc/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenc/subscriptions","organizations_url":"https://api.github.com/users/stephenc/orgs","repos_url":"https://api.github.com/users/stephenc/repos","events_url":"https://api.github.com/users/stephenc/events{/privacy}","received_events_url":"https://api.github.com/users/stephenc/received_events","type":"User","site_admin":false},"repo":{"id":68835660,"name":"stash-pullrequest-builder-plugin","full_name":"stephenc/stash-pullrequest-builder-plugin","owner":{"login":"stephenc","id":209336,"avatar_url":"https://avatars.githubusercontent.com/u/209336?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenc","html_url":"https://github.com/stephenc","followers_url":"https://api.github.com/users/stephenc/followers","following_url":"https://api.github.com/users/stephenc/following{/other_user}","gists_url":"https://api.github.com/users/stephenc/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenc/subscriptions","organizations_url":"https://api.github.com/users/stephenc/orgs","repos_url":"https://api.github.com/users/stephenc/repos","events_url":"https://api.github.com/users/stephenc/events{/privacy}","received_events_url":"https://api.github.com/users/stephenc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stephenc/stash-pullrequest-builder-plugin","description":"A Jenkins plugin for Building Stash Pull Request","fork":true,"url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin","forks_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/forks","keys_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/teams","hooks_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/hooks","issue_events_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/events","assignees_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/tags","blobs_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/languages","stargazers_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/stargazers","contributors_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/contributors","subscribers_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/subscribers","subscription_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/subscription","commits_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/merges","archive_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/downloads","issues_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/labels{/name}","releases_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/stephenc/stash-pullrequest-builder-plugin/deployments","created_at":"2016-09-21T16:20:08Z","updated_at":"2016-09-21T16:20:09Z","pushed_at":"2016-09-21T16:20:38Z","git_url":"git://github.com/stephenc/stash-pullrequest-builder-plugin.git","ssh_url":"git@github.com:stephenc/stash-pullrequest-builder-plugin.git","clone_url":"https://github.com/stephenc/stash-pullrequest-builder-plugin.git","svn_url":"https://github.com/stephenc/stash-pullrequest-builder-plugin","homepage":null,"size":157,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"jenkinsci:master","ref":"master","sha":"20d36fb5e6ab09a896b55bf814fca307dafaf166","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","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":32780417,"name":"stash-pullrequest-builder-plugin","full_name":"jenkinsci/stash-pullrequest-builder-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","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/stash-pullrequest-builder-plugin","description":"A Jenkins plugin for Building Stash Pull Request","fork":true,"url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin","forks_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/deployments","created_at":"2015-03-24T06:32:12Z","updated_at":"2016-09-02T08:58:39Z","pushed_at":"2016-09-21T16:24:39Z","git_url":"git://github.com/jenkinsci/stash-pullrequest-builder-plugin.git","ssh_url":"git@github.com:jenkinsci/stash-pullrequest-builder-plugin.git","clone_url":"https://github.com/jenkinsci/stash-pullrequest-builder-plugin.git","svn_url":"https://github.com/jenkinsci/stash-pullrequest-builder-plugin","homepage":null,"size":157,"stargazers_count":24,"watchers_count":24,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":5,"forks":34,"open_issues":5,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/pulls/18"},"html":{"href":"https://github.com/jenkinsci/stash-pullrequest-builder-plugin/pull/18"},"issue":{"href":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/issues/18"},"comments":{"href":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/stash-pullrequest-builder-plugin/statuses/b27cc5d3fd043905a4683f63e668c8fd76cf6a96"}}}}
{"actor":{"display_login":"oleg-nenashev"}}