{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/comments/27006645","id":27006645,"diff_hunk":"@@ -244,4 +244,21 @@ public String toString() {\n                 \",buildsByBranchName=\"+buildsByBranchName+\n                 \",lastBuild=\"+lastBuild+\"]\";\n     }\n+\n+    /**\n+     * Remove branches from BuildData that have been seen in the past but do not exist anymore\n+     * @param branches all branches available in current repository state\n+     */\n+    public void purgeAllBranchesBut(Set<Branch> branches) {","path":"src/main/java/hudson/plugins/git/util/BuildData.java","position":9,"original_position":9,"commit_id":"253d8413d4c09cb52afcd33f36aa96049f015a7a","original_commit_id":"253d8413d4c09cb52afcd33f36aa96049f015a7a","user":{"login":"KostyaSha","id":231611,"avatar_url":"https://avatars.githubusercontent.com/u/231611?v=3","gravatar_id":"","url":"https://api.github.com/users/KostyaSha","html_url":"https://github.com/KostyaSha","followers_url":"https://api.github.com/users/KostyaSha/followers","following_url":"https://api.github.com/users/KostyaSha/following{/other_user}","gists_url":"https://api.github.com/users/KostyaSha/gists{/gist_id}","starred_url":"https://api.github.com/users/KostyaSha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KostyaSha/subscriptions","organizations_url":"https://api.github.com/users/KostyaSha/orgs","repos_url":"https://api.github.com/users/KostyaSha/repos","events_url":"https://api.github.com/users/KostyaSha/events{/privacy}","received_events_url":"https://api.github.com/users/KostyaSha/received_events","type":"User","site_admin":false},"body":"Maybe `purgeStaleBranches(Set<Branch> keepBranches)` ?","created_at":"2015-03-24T07:10:06Z","updated_at":"2015-03-24T07:10:06Z","html_url":"https://github.com/jenkinsci/git-plugin/pull/312#discussion_r27006645","pull_request_url":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/312","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/comments/27006645"},"html":{"href":"https://github.com/jenkinsci/git-plugin/pull/312#discussion_r27006645"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/312"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/312","id":31782039,"html_url":"https://github.com/jenkinsci/git-plugin/pull/312","diff_url":"https://github.com/jenkinsci/git-plugin/pull/312.diff","patch_url":"https://github.com/jenkinsci/git-plugin/pull/312.patch","issue_url":"https://api.github.com/repos/jenkinsci/git-plugin/issues/312","number":312,"state":"open","locked":false,"title":"[JENKINS-19022] purge deleted branches from BuildData","user":{"login":"ndeloof","id":132757,"avatar_url":"https://avatars.githubusercontent.com/u/132757?v=3","gravatar_id":"","url":"https://api.github.com/users/ndeloof","html_url":"https://github.com/ndeloof","followers_url":"https://api.github.com/users/ndeloof/followers","following_url":"https://api.github.com/users/ndeloof/following{/other_user}","gists_url":"https://api.github.com/users/ndeloof/gists{/gist_id}","starred_url":"https://api.github.com/users/ndeloof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndeloof/subscriptions","organizations_url":"https://api.github.com/users/ndeloof/orgs","repos_url":"https://api.github.com/users/ndeloof/repos","events_url":"https://api.github.com/users/ndeloof/events{/privacy}","received_events_url":"https://api.github.com/users/ndeloof/received_events","type":"User","site_admin":false},"body":"For team using a topic-branch workflow, BuildData is an always growing Map of (legacy) branches, copied from build to build. This enhancement to `PruneStaleBranch` removes obsolete entries from current BuildData object based on existing branches on remote repositori(es)\r\n\r\n@reviewbybees","created_at":"2015-03-23T22:49:13Z","updated_at":"2015-03-24T07:10:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"46ad789dd219892309000448f3732b82f7dd6a5c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/312/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/312/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/git-plugin/issues/312/comments","statuses_url":"https://api.github.com/repos/jenkinsci/git-plugin/statuses/253d8413d4c09cb52afcd33f36aa96049f015a7a","head":{"label":"ndeloof:BuildData","ref":"BuildData","sha":"253d8413d4c09cb52afcd33f36aa96049f015a7a","user":{"login":"ndeloof","id":132757,"avatar_url":"https://avatars.githubusercontent.com/u/132757?v=3","gravatar_id":"","url":"https://api.github.com/users/ndeloof","html_url":"https://github.com/ndeloof","followers_url":"https://api.github.com/users/ndeloof/followers","following_url":"https://api.github.com/users/ndeloof/following{/other_user}","gists_url":"https://api.github.com/users/ndeloof/gists{/gist_id}","starred_url":"https://api.github.com/users/ndeloof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndeloof/subscriptions","organizations_url":"https://api.github.com/users/ndeloof/orgs","repos_url":"https://api.github.com/users/ndeloof/repos","events_url":"https://api.github.com/users/ndeloof/events{/privacy}","received_events_url":"https://api.github.com/users/ndeloof/received_events","type":"User","site_admin":false},"repo":{"id":32762148,"name":"git-plugin","full_name":"ndeloof/git-plugin","owner":{"login":"ndeloof","id":132757,"avatar_url":"https://avatars.githubusercontent.com/u/132757?v=3","gravatar_id":"","url":"https://api.github.com/users/ndeloof","html_url":"https://github.com/ndeloof","followers_url":"https://api.github.com/users/ndeloof/followers","following_url":"https://api.github.com/users/ndeloof/following{/other_user}","gists_url":"https://api.github.com/users/ndeloof/gists{/gist_id}","starred_url":"https://api.github.com/users/ndeloof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndeloof/subscriptions","organizations_url":"https://api.github.com/users/ndeloof/orgs","repos_url":"https://api.github.com/users/ndeloof/repos","events_url":"https://api.github.com/users/ndeloof/events{/privacy}","received_events_url":"https://api.github.com/users/ndeloof/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ndeloof/git-plugin","description":"Git plugin for Jenkins","fork":true,"url":"https://api.github.com/repos/ndeloof/git-plugin","forks_url":"https://api.github.com/repos/ndeloof/git-plugin/forks","keys_url":"https://api.github.com/repos/ndeloof/git-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ndeloof/git-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ndeloof/git-plugin/teams","hooks_url":"https://api.github.com/repos/ndeloof/git-plugin/hooks","issue_events_url":"https://api.github.com/repos/ndeloof/git-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/ndeloof/git-plugin/events","assignees_url":"https://api.github.com/repos/ndeloof/git-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/ndeloof/git-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/ndeloof/git-plugin/tags","blobs_url":"https://api.github.com/repos/ndeloof/git-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ndeloof/git-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ndeloof/git-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/ndeloof/git-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ndeloof/git-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/ndeloof/git-plugin/languages","stargazers_url":"https://api.github.com/repos/ndeloof/git-plugin/stargazers","contributors_url":"https://api.github.com/repos/ndeloof/git-plugin/contributors","subscribers_url":"https://api.github.com/repos/ndeloof/git-plugin/subscribers","subscription_url":"https://api.github.com/repos/ndeloof/git-plugin/subscription","commits_url":"https://api.github.com/repos/ndeloof/git-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/ndeloof/git-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/ndeloof/git-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/ndeloof/git-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/ndeloof/git-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/ndeloof/git-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ndeloof/git-plugin/merges","archive_url":"https://api.github.com/repos/ndeloof/git-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ndeloof/git-plugin/downloads","issues_url":"https://api.github.com/repos/ndeloof/git-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/ndeloof/git-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/ndeloof/git-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/ndeloof/git-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ndeloof/git-plugin/labels{/name}","releases_url":"https://api.github.com/repos/ndeloof/git-plugin/releases{/id}","created_at":"2015-03-23T22:19:27Z","updated_at":"2015-03-23T22:19:29Z","pushed_at":"2015-03-23T22:28:40Z","git_url":"git://github.com/ndeloof/git-plugin.git","ssh_url":"git@github.com:ndeloof/git-plugin.git","clone_url":"https://github.com/ndeloof/git-plugin.git","svn_url":"https://github.com/ndeloof/git-plugin","homepage":"http://wiki.jenkins-ci.org/display/JENKINS/Git Plugin","size":9713,"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":"6d605973a848938c690609b5bb875ec55579dac1","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":612587,"name":"git-plugin","full_name":"jenkinsci/git-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/git-plugin","description":"Git plugin for Jenkins","fork":true,"url":"https://api.github.com/repos/jenkinsci/git-plugin","forks_url":"https://api.github.com/repos/jenkinsci/git-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/git-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/git-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/git-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/git-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/git-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/git-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/git-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/git-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/git-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/git-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/git-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/git-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/git-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/git-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/git-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/git-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/git-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/git-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/git-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/git-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/git-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/git-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/git-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/git-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/git-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/git-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/git-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/git-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/git-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/git-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/git-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/git-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/git-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/git-plugin/releases{/id}","created_at":"2010-04-15T21:07:21Z","updated_at":"2015-03-18T20:47:29Z","pushed_at":"2015-03-23T22:49:13Z","git_url":"git://github.com/jenkinsci/git-plugin.git","ssh_url":"git@github.com:jenkinsci/git-plugin.git","clone_url":"https://github.com/jenkinsci/git-plugin.git","svn_url":"https://github.com/jenkinsci/git-plugin","homepage":"http://wiki.jenkins-ci.org/display/JENKINS/Git Plugin","size":9713,"stargazers_count":330,"watchers_count":330,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":412,"mirror_url":null,"open_issues_count":38,"forks":412,"open_issues":38,"watchers":330,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/312"},"html":{"href":"https://github.com/jenkinsci/git-plugin/pull/312"},"issue":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/issues/312"},"comments":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/issues/312/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/312/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/312/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/statuses/253d8413d4c09cb52afcd33f36aa96049f015a7a"}}}}