GitHub PullRequestReviewCommentEvent at 2014-11-05 15:16:17
Repository: foia
Actor: khandelwal
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/18F/foia/pulls/comments/19878722","id":19878722,"diff_hunk":"@@ -0,0 +1,62 @@\n+import yaml\n+import os\n+import xlrd\n+import logging\n+import csv\n+from glob import iglob\n+from missing_descriptions import load_usacontacts\n+\n+extract_names = lambda yaml_data: [dept['name'] for dept in yaml_data]\n+\n+def open_forms_csv():\n+    ''' open form csv and convert to dictionary'''\n+    data = {}\n+    with open('../usagov-data/form_type.csv') as csvfile:\n+        form_list = csv.reader(csvfile)\n+        for row in form_list:\n+            data[row[0]] = row[1].strip()\n+    return data\n+\n+\n+def find_missing_mails_forms():\n+    ''' throw-away form to look for forms that are not equal\n+    to the list forms'''\n+    data = open_forms_csv()\n+    traversed = 0\n+\n+    # loop through the files\n+    for filename in iglob(\"../data\" + os.sep + \"*.yaml\"):\n+        with open(filename) as f:\n+            yaml_data = yaml.load(f.read())\n+\n+            if yaml_data['name'] in data.keys():\n+                #if the data can go into the agency pass\n+                if yaml_data['name'] in extract_names(yaml_data['departments']):\n+                    pass\n+                #elif the form data not in the yaml files\n+                elif yaml_data.get('request_form') != data[yaml_data['name']]:\n+                    #print only if it's a webform\n+                    if \"http\" in data[yaml_data['name']]:\n+                        print(\"Not =\",yaml_data['name'],yaml_data.get('request_form'),data[yaml_data['name']])\n+                        pass","path":"contacts/misc_scripts/missing_mail_form.py","position":41,"original_position":41,"commit_id":"fc10030a6054dbfca90c049c3efdc4afcfb1625c","original_commit_id":"fc10030a6054dbfca90c049c3efdc4afcfb1625c","user":{"login":"khandelwal","id":636752,"avatar_url":"https://avatars.githubusercontent.com/u/636752?v=2","gravatar_id":"","url":"https://api.github.com/users/khandelwal","html_url":"https://github.com/khandelwal","followers_url":"https://api.github.com/users/khandelwal/followers","following_url":"https://api.github.com/users/khandelwal/following{/other_user}","gists_url":"https://api.github.com/users/khandelwal/gists{/gist_id}","starred_url":"https://api.github.com/users/khandelwal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khandelwal/subscriptions","organizations_url":"https://api.github.com/users/khandelwal/orgs","repos_url":"https://api.github.com/users/khandelwal/repos","events_url":"https://api.github.com/users/khandelwal/events{/privacy}","received_events_url":"https://api.github.com/users/khandelwal/received_events","type":"User","site_admin":false},"body":"If you're intending to have this code be part of our repository, let's clean it up. We're judged by the code we write. ","created_at":"2014-11-05T15:16:17Z","updated_at":"2014-11-05T15:16:17Z","html_url":"https://github.com/18F/foia/pull/54#discussion_r19878722","pull_request_url":"https://api.github.com/repos/18F/foia/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/18F/foia/pulls/comments/19878722"},"html":{"href":"https://github.com/18F/foia/pull/54#discussion_r19878722"},"pull_request":{"href":"https://api.github.com/repos/18F/foia/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/18F/foia/pulls/54","id":23768532,"html_url":"https://github.com/18F/foia/pull/54","diff_url":"https://github.com/18F/foia/pull/54.diff","patch_url":"https://github.com/18F/foia/pull/54.patch","issue_url":"https://api.github.com/repos/18F/foia/issues/54","number":54,"state":"open","locked":false,"title":"forms and descriptions","user":{"login":"ramirezg","id":4596845,"avatar_url":"https://avatars.githubusercontent.com/u/4596845?v=2","gravatar_id":"","url":"https://api.github.com/users/ramirezg","html_url":"https://github.com/ramirezg","followers_url":"https://api.github.com/users/ramirezg/followers","following_url":"https://api.github.com/users/ramirezg/following{/other_user}","gists_url":"https://api.github.com/users/ramirezg/gists{/gist_id}","starred_url":"https://api.github.com/users/ramirezg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramirezg/subscriptions","organizations_url":"https://api.github.com/users/ramirezg/orgs","repos_url":"https://api.github.com/users/ramirezg/repos","events_url":"https://api.github.com/users/ramirezg/events{/privacy}","received_events_url":"https://api.github.com/users/ramirezg/received_events","type":"User","site_admin":false},"body":"Updates:\r\n1.  updated request form urls\r\n2.  associated ids, descriptions, and abbreviation with department level records\r\n3.  added missing descriptions\r\n4. cleaned up layer_with_usa_contacts.py","created_at":"2014-11-03T15:48:27Z","updated_at":"2014-11-05T15:16:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4af8cb2dd9bd7457b70590086ff8a788d0f69a52","assignee":{"login":"khandelwal","id":636752,"avatar_url":"https://avatars.githubusercontent.com/u/636752?v=2","gravatar_id":"","url":"https://api.github.com/users/khandelwal","html_url":"https://github.com/khandelwal","followers_url":"https://api.github.com/users/khandelwal/followers","following_url":"https://api.github.com/users/khandelwal/following{/other_user}","gists_url":"https://api.github.com/users/khandelwal/gists{/gist_id}","starred_url":"https://api.github.com/users/khandelwal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khandelwal/subscriptions","organizations_url":"https://api.github.com/users/khandelwal/orgs","repos_url":"https://api.github.com/users/khandelwal/repos","events_url":"https://api.github.com/users/khandelwal/events{/privacy}","received_events_url":"https://api.github.com/users/khandelwal/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/18F/foia/pulls/54/commits","review_comments_url":"https://api.github.com/repos/18F/foia/pulls/54/comments","review_comment_url":"https://api.github.com/repos/18F/foia/pulls/comments/{number}","comments_url":"https://api.github.com/repos/18F/foia/issues/54/comments","statuses_url":"https://api.github.com/repos/18F/foia/statuses/fc10030a6054dbfca90c049c3efdc4afcfb1625c","head":{"label":"18F:mail_forms","ref":"mail_forms","sha":"fc10030a6054dbfca90c049c3efdc4afcfb1625c","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=2","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":20223769,"name":"foia","full_name":"18F/foia","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=2","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/foia","description":"Project wide discussion, blogging, and scratch space for 18F's FOIA modernization team.","fork":false,"url":"https://api.github.com/repos/18F/foia","forks_url":"https://api.github.com/repos/18F/foia/forks","keys_url":"https://api.github.com/repos/18F/foia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/foia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/foia/teams","hooks_url":"https://api.github.com/repos/18F/foia/hooks","issue_events_url":"https://api.github.com/repos/18F/foia/issues/events{/number}","events_url":"https://api.github.com/repos/18F/foia/events","assignees_url":"https://api.github.com/repos/18F/foia/assignees{/user}","branches_url":"https://api.github.com/repos/18F/foia/branches{/branch}","tags_url":"https://api.github.com/repos/18F/foia/tags","blobs_url":"https://api.github.com/repos/18F/foia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/foia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/foia/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/foia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/foia/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/foia/languages","stargazers_url":"https://api.github.com/repos/18F/foia/stargazers","contributors_url":"https://api.github.com/repos/18F/foia/contributors","subscribers_url":"https://api.github.com/repos/18F/foia/subscribers","subscription_url":"https://api.github.com/repos/18F/foia/subscription","commits_url":"https://api.github.com/repos/18F/foia/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/foia/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/foia/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/foia/issues/comments/{number}","contents_url":"https://api.github.com/repos/18F/foia/contents/{+path}","compare_url":"https://api.github.com/repos/18F/foia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/foia/merges","archive_url":"https://api.github.com/repos/18F/foia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/foia/downloads","issues_url":"https://api.github.com/repos/18F/foia/issues{/number}","pulls_url":"https://api.github.com/repos/18F/foia/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/foia/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/foia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/foia/labels{/name}","releases_url":"https://api.github.com/repos/18F/foia/releases{/id}","created_at":"2014-05-27T14:52:27Z","updated_at":"2014-11-03T13:18:32Z","pushed_at":"2014-11-05T15:15:51Z","git_url":"git://github.com/18F/foia.git","ssh_url":"git@github.com:18F/foia.git","clone_url":"https://github.com/18F/foia.git","svn_url":"https://github.com/18F/foia","homepage":"","size":8737,"stargazers_count":26,"watchers_count":26,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":7,"forks":5,"open_issues":7,"watchers":26,"default_branch":"master"}},"base":{"label":"18F:master","ref":"master","sha":"0102d7544ef72c3a2c5eb2798782ce814818af47","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=2","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":20223769,"name":"foia","full_name":"18F/foia","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=2","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/foia","description":"Project wide discussion, blogging, and scratch space for 18F's FOIA modernization team.","fork":false,"url":"https://api.github.com/repos/18F/foia","forks_url":"https://api.github.com/repos/18F/foia/forks","keys_url":"https://api.github.com/repos/18F/foia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/foia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/foia/teams","hooks_url":"https://api.github.com/repos/18F/foia/hooks","issue_events_url":"https://api.github.com/repos/18F/foia/issues/events{/number}","events_url":"https://api.github.com/repos/18F/foia/events","assignees_url":"https://api.github.com/repos/18F/foia/assignees{/user}","branches_url":"https://api.github.com/repos/18F/foia/branches{/branch}","tags_url":"https://api.github.com/repos/18F/foia/tags","blobs_url":"https://api.github.com/repos/18F/foia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/foia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/foia/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/foia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/foia/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/foia/languages","stargazers_url":"https://api.github.com/repos/18F/foia/stargazers","contributors_url":"https://api.github.com/repos/18F/foia/contributors","subscribers_url":"https://api.github.com/repos/18F/foia/subscribers","subscription_url":"https://api.github.com/repos/18F/foia/subscription","commits_url":"https://api.github.com/repos/18F/foia/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/foia/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/foia/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/foia/issues/comments/{number}","contents_url":"https://api.github.com/repos/18F/foia/contents/{+path}","compare_url":"https://api.github.com/repos/18F/foia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/foia/merges","archive_url":"https://api.github.com/repos/18F/foia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/foia/downloads","issues_url":"https://api.github.com/repos/18F/foia/issues{/number}","pulls_url":"https://api.github.com/repos/18F/foia/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/foia/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/foia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/foia/labels{/name}","releases_url":"https://api.github.com/repos/18F/foia/releases{/id}","created_at":"2014-05-27T14:52:27Z","updated_at":"2014-11-03T13:18:32Z","pushed_at":"2014-11-05T15:15:51Z","git_url":"git://github.com/18F/foia.git","ssh_url":"git@github.com:18F/foia.git","clone_url":"https://github.com/18F/foia.git","svn_url":"https://github.com/18F/foia","homepage":"","size":8737,"stargazers_count":26,"watchers_count":26,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":7,"forks":5,"open_issues":7,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/18F/foia/pulls/54"},"html":{"href":"https://github.com/18F/foia/pull/54"},"issue":{"href":"https://api.github.com/repos/18F/foia/issues/54"},"comments":{"href":"https://api.github.com/repos/18F/foia/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/18F/foia/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/18F/foia/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/18F/foia/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/18F/foia/statuses/fc10030a6054dbfca90c049c3efdc4afcfb1625c"}}}}