{"action":"created","comment":{"url":"https://api.github.com/repos/uber/okbuck/pulls/comments/232466939","pull_request_review_id":173675326,"id":232466939,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjQ2NjkzOQ==","diff_hunk":"@@ -10,24 +10,83 @@ boolean useCompilationClasspath,\n String classpathExclusionRegex\n )\n \n-import os, re\n+def basename(path):\n+    return path.rpartition(\"/\")[-1]\n \n+def dirname(path):\n+    prefix, sep, _ = path.rpartition(\"/\")\n+    if not prefix:\n+        return sep\n+    else:\n+        return prefix.rstrip(\"/\")\n+\n+def paths_join(prefix, suffix):\n+    result = prefix\n+    if not prefix or prefix.endswith(\"/\"):\n+        result += suffix\n+    else:\n+        result += \"/\" + suffix\n+    return result\n \n def merge_maps(**res_maps):\n     result = {}\n-    for path, res_map in res_maps.iteritems():\n+    for path, res_map in res_maps.items():\n         for key in res_map:\n             if key in result and result[key] != res_map[key]:\n-                dirname = os.path.dirname(key)\n-                basename = os.path.basename(key)\n-                new_key = '/'.join([dirname, path.replace('/', '_') + '_' + basename])\n+                dir_name = dirname(key)\n+                base_name = basename(key)\n+                new_key = '/'.join([dir_name, path.replace('/', '_') + '_' + base_name])\n                 result[new_key] = res_map[key]\n             else:\n                 result[key] = res_map[key]\n \n     return result\n \n \n+def subdir_glob(glob_specs, exclude = None, prefix = \"\"):","path":"buildSrc/src/main/rocker/com/uber/okbuck/template/config/BuckDefs.rocker.raw","position":42,"original_position":42,"commit_id":"49204246d5c429890e14b79d17fac29f7f5af8ae","original_commit_id":"49204246d5c429890e14b79d17fac29f7f5af8ae","user":{"login":"raviagarwal7","id":1913956,"node_id":"MDQ6VXNlcjE5MTM5NTY=","avatar_url":"https://avatars1.githubusercontent.com/u/1913956?v=4","gravatar_id":"","url":"https://api.github.com/users/raviagarwal7","html_url":"https://github.com/raviagarwal7","followers_url":"https://api.github.com/users/raviagarwal7/followers","following_url":"https://api.github.com/users/raviagarwal7/following{/other_user}","gists_url":"https://api.github.com/users/raviagarwal7/gists{/gist_id}","starred_url":"https://api.github.com/users/raviagarwal7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raviagarwal7/subscriptions","organizations_url":"https://api.github.com/users/raviagarwal7/orgs","repos_url":"https://api.github.com/users/raviagarwal7/repos","events_url":"https://api.github.com/users/raviagarwal7/events{/privacy}","received_events_url":"https://api.github.com/users/raviagarwal7/received_events","type":"User","site_admin":false},"body":"also, probably move to it's own bazel file","created_at":"2018-11-10T21:40:28Z","updated_at":"2018-11-10T21:45:11Z","html_url":"https://github.com/uber/okbuck/pull/757#discussion_r232466939","pull_request_url":"https://api.github.com/repos/uber/okbuck/pulls/757","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/uber/okbuck/pulls/comments/232466939"},"html":{"href":"https://github.com/uber/okbuck/pull/757#discussion_r232466939"},"pull_request":{"href":"https://api.github.com/repos/uber/okbuck/pulls/757"}},"in_reply_to_id":232466932},"pull_request":{"url":"https://api.github.com/repos/uber/okbuck/pulls/757","id":229835155,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5ODM1MTU1","html_url":"https://github.com/uber/okbuck/pull/757","diff_url":"https://github.com/uber/okbuck/pull/757.diff","patch_url":"https://github.com/uber/okbuck/pull/757.patch","issue_url":"https://api.github.com/repos/uber/okbuck/issues/757","number":757,"state":"open","locked":false,"title":"Fully switched okBuck to skylark.","user":{"login":"romanoid","id":1832862,"node_id":"MDQ6VXNlcjE4MzI4NjI=","avatar_url":"https://avatars1.githubusercontent.com/u/1832862?v=4","gravatar_id":"","url":"https://api.github.com/users/romanoid","html_url":"https://github.com/romanoid","followers_url":"https://api.github.com/users/romanoid/followers","following_url":"https://api.github.com/users/romanoid/following{/other_user}","gists_url":"https://api.github.com/users/romanoid/gists{/gist_id}","starred_url":"https://api.github.com/users/romanoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romanoid/subscriptions","organizations_url":"https://api.github.com/users/romanoid/orgs","repos_url":"https://api.github.com/users/romanoid/repos","events_url":"https://api.github.com/users/romanoid/events{/privacy}","received_events_url":"https://api.github.com/users/romanoid/received_events","type":"User","site_admin":false},"body":"Overrides are supported by mechanism added in 8072382\r\nNote: enbaling SKYLARK should not be required to adopt this change, since all the API should be supported by BUCK's python parser.\r\n\r\n<!--\r\nThank you for contributing to okbuck. Before pressing the \"Create Pull Request\" button, please consider the following points.\r\nFeel free to remove any irrelevant parts that you know are not related to the issue.\r\nAny HTML comment like this will be stripped when rendering markdown, no need to delete them.\r\n-->\r\n\r\n<!-- Please give a description about what and why you are contributing, even if it's trivial. -->\r\n**Description**:\r\n\r\n<!-- Please include the issue list number(s) or other PR numbers in the description if you are contributing in response to those. -->\r\n**Related issue(s)**:\r\n","created_at":"2018-11-09T22:19:39Z","updated_at":"2018-11-10T21:45:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"427cdd04ac3ead55f1e7a045e078e6e272dde8cb","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kageiit","id":291148,"node_id":"MDQ6VXNlcjI5MTE0OA==","avatar_url":"https://avatars0.githubusercontent.com/u/291148?v=4","gravatar_id":"","url":"https://api.github.com/users/kageiit","html_url":"https://github.com/kageiit","followers_url":"https://api.github.com/users/kageiit/followers","following_url":"https://api.github.com/users/kageiit/following{/other_user}","gists_url":"https://api.github.com/users/kageiit/gists{/gist_id}","starred_url":"https://api.github.com/users/kageiit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kageiit/subscriptions","organizations_url":"https://api.github.com/users/kageiit/orgs","repos_url":"https://api.github.com/users/kageiit/repos","events_url":"https://api.github.com/users/kageiit/events{/privacy}","received_events_url":"https://api.github.com/users/kageiit/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/uber/okbuck/pulls/757/commits","review_comments_url":"https://api.github.com/repos/uber/okbuck/pulls/757/comments","review_comment_url":"https://api.github.com/repos/uber/okbuck/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber/okbuck/issues/757/comments","statuses_url":"https://api.github.com/repos/uber/okbuck/statuses/49204246d5c429890e14b79d17fac29f7f5af8ae","head":{"label":"romanoid:skylarkify-okbuck-defs","ref":"skylarkify-okbuck-defs","sha":"49204246d5c429890e14b79d17fac29f7f5af8ae","user":{"login":"romanoid","id":1832862,"node_id":"MDQ6VXNlcjE4MzI4NjI=","avatar_url":"https://avatars1.githubusercontent.com/u/1832862?v=4","gravatar_id":"","url":"https://api.github.com/users/romanoid","html_url":"https://github.com/romanoid","followers_url":"https://api.github.com/users/romanoid/followers","following_url":"https://api.github.com/users/romanoid/following{/other_user}","gists_url":"https://api.github.com/users/romanoid/gists{/gist_id}","starred_url":"https://api.github.com/users/romanoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romanoid/subscriptions","organizations_url":"https://api.github.com/users/romanoid/orgs","repos_url":"https://api.github.com/users/romanoid/repos","events_url":"https://api.github.com/users/romanoid/events{/privacy}","received_events_url":"https://api.github.com/users/romanoid/received_events","type":"User","site_admin":false},"repo":{"id":131762637,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE3NjI2Mzc=","name":"okbuck","full_name":"romanoid/okbuck","private":false,"owner":{"login":"romanoid","id":1832862,"node_id":"MDQ6VXNlcjE4MzI4NjI=","avatar_url":"https://avatars1.githubusercontent.com/u/1832862?v=4","gravatar_id":"","url":"https://api.github.com/users/romanoid","html_url":"https://github.com/romanoid","followers_url":"https://api.github.com/users/romanoid/followers","following_url":"https://api.github.com/users/romanoid/following{/other_user}","gists_url":"https://api.github.com/users/romanoid/gists{/gist_id}","starred_url":"https://api.github.com/users/romanoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romanoid/subscriptions","organizations_url":"https://api.github.com/users/romanoid/orgs","repos_url":"https://api.github.com/users/romanoid/repos","events_url":"https://api.github.com/users/romanoid/events{/privacy}","received_events_url":"https://api.github.com/users/romanoid/received_events","type":"User","site_admin":false},"html_url":"https://github.com/romanoid/okbuck","description":"OkBuck is a gradle plugin that lets developers utilize the Buck build system on a gradle project.","fork":true,"url":"https://api.github.com/repos/romanoid/okbuck","forks_url":"https://api.github.com/repos/romanoid/okbuck/forks","keys_url":"https://api.github.com/repos/romanoid/okbuck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/romanoid/okbuck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/romanoid/okbuck/teams","hooks_url":"https://api.github.com/repos/romanoid/okbuck/hooks","issue_events_url":"https://api.github.com/repos/romanoid/okbuck/issues/events{/number}","events_url":"https://api.github.com/repos/romanoid/okbuck/events","assignees_url":"https://api.github.com/repos/romanoid/okbuck/assignees{/user}","branches_url":"https://api.github.com/repos/romanoid/okbuck/branches{/branch}","tags_url":"https://api.github.com/repos/romanoid/okbuck/tags","blobs_url":"https://api.github.com/repos/romanoid/okbuck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/romanoid/okbuck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/romanoid/okbuck/git/refs{/sha}","trees_url":"https://api.github.com/repos/romanoid/okbuck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/romanoid/okbuck/statuses/{sha}","languages_url":"https://api.github.com/repos/romanoid/okbuck/languages","stargazers_url":"https://api.github.com/repos/romanoid/okbuck/stargazers","contributors_url":"https://api.github.com/repos/romanoid/okbuck/contributors","subscribers_url":"https://api.github.com/repos/romanoid/okbuck/subscribers","subscription_url":"https://api.github.com/repos/romanoid/okbuck/subscription","commits_url":"https://api.github.com/repos/romanoid/okbuck/commits{/sha}","git_commits_url":"https://api.github.com/repos/romanoid/okbuck/git/commits{/sha}","comments_url":"https://api.github.com/repos/romanoid/okbuck/comments{/number}","issue_comment_url":"https://api.github.com/repos/romanoid/okbuck/issues/comments{/number}","contents_url":"https://api.github.com/repos/romanoid/okbuck/contents/{+path}","compare_url":"https://api.github.com/repos/romanoid/okbuck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/romanoid/okbuck/merges","archive_url":"https://api.github.com/repos/romanoid/okbuck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/romanoid/okbuck/downloads","issues_url":"https://api.github.com/repos/romanoid/okbuck/issues{/number}","pulls_url":"https://api.github.com/repos/romanoid/okbuck/pulls{/number}","milestones_url":"https://api.github.com/repos/romanoid/okbuck/milestones{/number}","notifications_url":"https://api.github.com/repos/romanoid/okbuck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/romanoid/okbuck/labels{/name}","releases_url":"https://api.github.com/repos/romanoid/okbuck/releases{/id}","deployments_url":"https://api.github.com/repos/romanoid/okbuck/deployments","created_at":"2018-05-01T21:00:28Z","updated_at":"2018-10-29T22:03:19Z","pushed_at":"2018-11-09T22:29:07Z","git_url":"git://github.com/romanoid/okbuck.git","ssh_url":"git@github.com:romanoid/okbuck.git","clone_url":"https://github.com/romanoid/okbuck.git","svn_url":"https://github.com/romanoid/okbuck","homepage":"","size":17158,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"uber:master","ref":"master","sha":"80723820638290d8458a710c8e2d17b1f0196769","user":{"login":"uber","id":538264,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODI2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/538264?v=4","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":43598554,"node_id":"MDEwOlJlcG9zaXRvcnk0MzU5ODU1NA==","name":"okbuck","full_name":"uber/okbuck","private":false,"owner":{"login":"uber","id":538264,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODI2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/538264?v=4","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/uber/okbuck","description":"OkBuck is a gradle plugin that lets developers utilize the Buck build system on a gradle project.","fork":false,"url":"https://api.github.com/repos/uber/okbuck","forks_url":"https://api.github.com/repos/uber/okbuck/forks","keys_url":"https://api.github.com/repos/uber/okbuck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/okbuck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/okbuck/teams","hooks_url":"https://api.github.com/repos/uber/okbuck/hooks","issue_events_url":"https://api.github.com/repos/uber/okbuck/issues/events{/number}","events_url":"https://api.github.com/repos/uber/okbuck/events","assignees_url":"https://api.github.com/repos/uber/okbuck/assignees{/user}","branches_url":"https://api.github.com/repos/uber/okbuck/branches{/branch}","tags_url":"https://api.github.com/repos/uber/okbuck/tags","blobs_url":"https://api.github.com/repos/uber/okbuck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/okbuck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/okbuck/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/okbuck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/okbuck/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/okbuck/languages","stargazers_url":"https://api.github.com/repos/uber/okbuck/stargazers","contributors_url":"https://api.github.com/repos/uber/okbuck/contributors","subscribers_url":"https://api.github.com/repos/uber/okbuck/subscribers","subscription_url":"https://api.github.com/repos/uber/okbuck/subscription","commits_url":"https://api.github.com/repos/uber/okbuck/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/okbuck/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/okbuck/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/okbuck/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/okbuck/contents/{+path}","compare_url":"https://api.github.com/repos/uber/okbuck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/okbuck/merges","archive_url":"https://api.github.com/repos/uber/okbuck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/okbuck/downloads","issues_url":"https://api.github.com/repos/uber/okbuck/issues{/number}","pulls_url":"https://api.github.com/repos/uber/okbuck/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/okbuck/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/okbuck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/okbuck/labels{/name}","releases_url":"https://api.github.com/repos/uber/okbuck/releases{/id}","deployments_url":"https://api.github.com/repos/uber/okbuck/deployments","created_at":"2015-10-03T12:36:22Z","updated_at":"2018-11-10T10:12:19Z","pushed_at":"2018-11-10T16:12:05Z","git_url":"git://github.com/uber/okbuck.git","ssh_url":"git@github.com:uber/okbuck.git","clone_url":"https://github.com/uber/okbuck.git","svn_url":"https://github.com/uber/okbuck","homepage":"","size":17173,"stargazers_count":1284,"watchers_count":1284,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":134,"mirror_url":null,"archived":false,"open_issues_count":24,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":134,"open_issues":24,"watchers":1284,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uber/okbuck/pulls/757"},"html":{"href":"https://github.com/uber/okbuck/pull/757"},"issue":{"href":"https://api.github.com/repos/uber/okbuck/issues/757"},"comments":{"href":"https://api.github.com/repos/uber/okbuck/issues/757/comments"},"review_comments":{"href":"https://api.github.com/repos/uber/okbuck/pulls/757/comments"},"review_comment":{"href":"https://api.github.com/repos/uber/okbuck/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber/okbuck/pulls/757/commits"},"statuses":{"href":"https://api.github.com/repos/uber/okbuck/statuses/49204246d5c429890e14b79d17fac29f7f5af8ae"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"raviagarwal7"}}