{"action":"created","issue":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5000","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5000/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5000/comments","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5000/events","html_url":"https://github.com/rapid7/metasploit-framework/pull/5000","id":64105122,"number":5000,"title":"Utility for adding PR fetch refs","user":{"login":"todb-r7","id":1170909,"avatar_url":"https://avatars.githubusercontent.com/u/1170909?v=3","gravatar_id":"","url":"https://api.github.com/users/todb-r7","html_url":"https://github.com/todb-r7","followers_url":"https://api.github.com/users/todb-r7/followers","following_url":"https://api.github.com/users/todb-r7/following{/other_user}","gists_url":"https://api.github.com/users/todb-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/todb-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/todb-r7/subscriptions","organizations_url":"https://api.github.com/users/todb-r7/orgs","repos_url":"https://api.github.com/users/todb-r7/repos","events_url":"https://api.github.com/users/todb-r7/events{/privacy}","received_events_url":"https://api.github.com/users/todb-r7/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/external","name":"external","color":"bfdadc"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/feature","name":"feature","color":"bfe5bf"}],"state":"open","locked":false,"assignee":{"login":"wvu-r7","id":4551878,"avatar_url":"https://avatars.githubusercontent.com/u/4551878?v=3","gravatar_id":"","url":"https://api.github.com/users/wvu-r7","html_url":"https://github.com/wvu-r7","followers_url":"https://api.github.com/users/wvu-r7/followers","following_url":"https://api.github.com/users/wvu-r7/following{/other_user}","gists_url":"https://api.github.com/users/wvu-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/wvu-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wvu-r7/subscriptions","organizations_url":"https://api.github.com/users/wvu-r7/orgs","repos_url":"https://api.github.com/users/wvu-r7/repos","events_url":"https://api.github.com/users/wvu-r7/events{/privacy}","received_events_url":"https://api.github.com/users/wvu-r7/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-03-24T21:31:21Z","updated_at":"2015-03-24T21:43:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/5000","html_url":"https://github.com/rapid7/metasploit-framework/pull/5000","diff_url":"https://github.com/rapid7/metasploit-framework/pull/5000.diff","patch_url":"https://github.com/rapid7/metasploit-framework/pull/5000.patch"},"body":"It's so annoying to have to hand-edit my .git/config to add `fetch` references for a repository's pull requests. This utility does the job for me.\r\n\r\n## Verification\r\n\r\n- [x] Check your local `.git/config` Do you have `fetch` references to `upstream/pr` and all other remotes?\r\n- [x] If so, run `tools/dev/add-pr-remote.rb`. You should see no changes.\r\n- [x] If you have only some remote branches with pr fetch refs, `add-pr-remote.rb` should fill in the rest.\r\n- [x] If you have no remote branches with pr fetch refs, then you should see all of them added.\r\n- [x] Running the tool multiple times shouldn't create more fetch refs.\r\n\r\nExample:\r\n\r\n```\r\ntodb@mazikeen:~/git/rapid7/metasploit-framework$ tools/dev/add-pr-remote.rb \r\nRewriting /home/todb/git/rapid7/metasploit-framework/.git/config\r\nSkipping upstream, already present\r\nSkipping origin, already present\r\nAdding pull request fetch for joevennix\r\nAdding pull request fetch for limhoff-r7\r\nWrote /home/todb/git/rapid7/metasploit-framework/.git/config\r\n[ruby-2.1.5@metasploit-framework](add-pr-fetches) \r\ntodb@mazikeen:~/git/rapid7/metasploit-framework$ tools/dev/add-pr-remote.rb \r\nRewriting /home/todb/git/rapid7/metasploit-framework/.git/config\r\nSkipping upstream, already present\r\nSkipping origin, already present\r\nSkipping joevennix, already present\r\nSkipping limhoff-r7, already present\r\nNo changes to /home/todb/git/rapid7/metasploit-framework/.git/config\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/comments/85705789","html_url":"https://github.com/rapid7/metasploit-framework/pull/5000#issuecomment-85705789","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5000","id":85705789,"user":{"login":"wvu-r7","id":4551878,"avatar_url":"https://avatars.githubusercontent.com/u/4551878?v=3","gravatar_id":"","url":"https://api.github.com/users/wvu-r7","html_url":"https://github.com/wvu-r7","followers_url":"https://api.github.com/users/wvu-r7/followers","following_url":"https://api.github.com/users/wvu-r7/following{/other_user}","gists_url":"https://api.github.com/users/wvu-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/wvu-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wvu-r7/subscriptions","organizations_url":"https://api.github.com/users/wvu-r7/orgs","repos_url":"https://api.github.com/users/wvu-r7/repos","events_url":"https://api.github.com/users/wvu-r7/events{/privacy}","received_events_url":"https://api.github.com/users/wvu-r7/received_events","type":"User","site_admin":false},"created_at":"2015-03-24T21:43:19Z","updated_at":"2015-03-24T21:43:19Z","body":"@todb-r7: Can you rename this to ```add_pr_fetch.rb``` or at least with underscores to fit our tool-naming convention?"}}