{"action":"closed","issue":{"url":"https://api.github.com/repos/pantsbuild/pants/issues/2018","repository_url":"https://api.github.com/repos/pantsbuild/pants","labels_url":"https://api.github.com/repos/pantsbuild/pants/issues/2018/labels{/name}","comments_url":"https://api.github.com/repos/pantsbuild/pants/issues/2018/comments","events_url":"https://api.github.com/repos/pantsbuild/pants/issues/2018/events","html_url":"https://github.com/pantsbuild/pants/issues/2018","id":101932129,"number":2018,"title":"Support finer control for assigning fetchers to remotes.","user":{"login":"jsirois","id":157586,"avatar_url":"https://avatars.githubusercontent.com/u/157586?v=3","gravatar_id":"","url":"https://api.github.com/users/jsirois","html_url":"https://github.com/jsirois","followers_url":"https://api.github.com/users/jsirois/followers","following_url":"https://api.github.com/users/jsirois/following{/other_user}","gists_url":"https://api.github.com/users/jsirois/gists{/gist_id}","starred_url":"https://api.github.com/users/jsirois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsirois/subscriptions","organizations_url":"https://api.github.com/users/jsirois/orgs","repos_url":"https://api.github.com/users/jsirois/repos","events_url":"https://api.github.com/users/jsirois/events{/privacy}","received_events_url":"https://api.github.com/users/jsirois/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pantsbuild/pants/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/pantsbuild/pants/labels/Medium","name":"Medium","color":"6F4E37"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-19T16:11:58Z","updated_at":"2016-05-28T00:56:55Z","closed_at":"2016-05-28T00:56:55Z","body":"The rough sketch idea is 2 part:\r\n1. Introduce `[fetchers] fetchers` which is a new dict config of name (will be used as an options scope) -> FetcherType, eg:\r\n```ini\r\n[fetchers]\r\nfetchers: {\r\n    'artifactory.com': 'ArchiveFetcher',\r\n    'github.com': 'ArchiveFetcher'\r\n  }\r\n```\r\nThe existing `[fetchers] mapping` becomes an ordered mapping from regex to fetcher name, eg:\r\n```ini\r\n[fetchers]\r\nmapping: [\r\n    ('github.com/gorilla', 'github.com'),\r\n    ('.*', 'artifactory.com')\r\n  ]\r\n```\r\nThe ordering allows a dev to put mappings for the new stuff they want to try at the top of the list.\r\n\r\nThe Fetchers class would then instantiate Fetchers that are Subsystems using their names as their option scope.  This allows having 2 `ArchiveFetcher` instances configured differently - one pointed at github.com, one at artifactory.\r\n\r\nThis grew out of discussion here: https://rbcommons.com/s/twitter/r/2655/"}}
{"actor":{"display_login":"benjyw"}}