{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/payments-env/pulls/comments/29538436","id":29538436,"diff_hunk":"@@ -0,0 +1,43 @@\n+#!/usr/bin/env python\n+import argparse\n+import os\n+\n+\n+def main():\n+    parser = argparse.ArgumentParser(description='link to source code')\n+    parser.add_argument(\n+        '--root',\n+        help='root directory where you cloned the source code')\n+    args = parser.parse_args()\n+    if not args.root:\n+        args.root = raw_input('What directory is your source code in? ')\n+    args.root = os.path.normpath(os.path.expanduser(args.root))\n+\n+    errors = False\n+    for name in [\n+        'payments-service',\n+        'solitude',\n+    ]:\n+        full_name = os.path.join(args.root, name)\n+        if not os.path.exists(full_name):\n+            print\n+            print ('** Repository at {path} does not exist. '\n+                   'Is it checked out?'.format(path=full_name))\n+            print\n+            errors = True\n+            continue\n+\n+        dest = './docker/source-links/{name}'.format(name=name)\n+        print '{source} -> {dest}'.format(source=full_name, dest=dest)\n+\n+        if os.path.exists(dest):\n+            print '(already exists)'\n+        else:\n+            os.symlink(full_name, dest)\n+\n+    if errors:\n+        parser.error('Not all symlinks were successful')","path":"link.py","position":39,"original_position":39,"commit_id":"5bdacca9465bd881395f4eced52a62d1ef9f319e","original_commit_id":"5bdacca9465bd881395f4eced52a62d1ef9f319e","user":{"login":"andymckay","id":74699,"avatar_url":"https://avatars.githubusercontent.com/u/74699?v=3","gravatar_id":"","url":"https://api.github.com/users/andymckay","html_url":"https://github.com/andymckay","followers_url":"https://api.github.com/users/andymckay/followers","following_url":"https://api.github.com/users/andymckay/following{/other_user}","gists_url":"https://api.github.com/users/andymckay/gists{/gist_id}","starred_url":"https://api.github.com/users/andymckay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andymckay/subscriptions","organizations_url":"https://api.github.com/users/andymckay/orgs","repos_url":"https://api.github.com/users/andymckay/repos","events_url":"https://api.github.com/users/andymckay/events{/privacy}","received_events_url":"https://api.github.com/users/andymckay/received_events","type":"User","site_admin":false},"body":"Its just templating of a text file and it allows a bunch of neat things like the ability to run `fig up` from anywhere, flip between `build` and `image` and so much more. I think the flexibility is worth it.\r\n\r\nAnyway if this is useful to you leave it.","created_at":"2015-05-01T22:29:54Z","updated_at":"2015-05-01T22:29:54Z","html_url":"https://github.com/mozilla/payments-env/pull/5#discussion_r29538436","pull_request_url":"https://api.github.com/repos/mozilla/payments-env/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/mozilla/payments-env/pulls/comments/29538436"},"html":{"href":"https://github.com/mozilla/payments-env/pull/5#discussion_r29538436"},"pull_request":{"href":"https://api.github.com/repos/mozilla/payments-env/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/payments-env/pulls/5","id":34570387,"html_url":"https://github.com/mozilla/payments-env/pull/5","diff_url":"https://github.com/mozilla/payments-env/pull/5.diff","patch_url":"https://github.com/mozilla/payments-env/pull/5.patch","issue_url":"https://api.github.com/repos/mozilla/payments-env/issues/5","number":5,"state":"open","locked":false,"title":"Add example site for testing (fixes #26)","user":{"login":"kumar303","id":55398,"avatar_url":"https://avatars.githubusercontent.com/u/55398?v=3","gravatar_id":"","url":"https://api.github.com/users/kumar303","html_url":"https://github.com/kumar303","followers_url":"https://api.github.com/users/kumar303/followers","following_url":"https://api.github.com/users/kumar303/following{/other_user}","gists_url":"https://api.github.com/users/kumar303/gists{/gist_id}","starred_url":"https://api.github.com/users/kumar303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumar303/subscriptions","organizations_url":"https://api.github.com/users/kumar303/orgs","repos_url":"https://api.github.com/users/kumar303/repos","events_url":"https://api.github.com/users/kumar303/events{/privacy}","received_events_url":"https://api.github.com/users/kumar303/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-01T21:50:07Z","updated_at":"2015-05-01T22:29:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0e3bf69dcbb74044f31682cae62cc6f2472fc4e4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/payments-env/pulls/5/commits","review_comments_url":"https://api.github.com/repos/mozilla/payments-env/pulls/5/comments","review_comment_url":"https://api.github.com/repos/mozilla/payments-env/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/payments-env/issues/5/comments","statuses_url":"https://api.github.com/repos/mozilla/payments-env/statuses/5bdacca9465bd881395f4eced52a62d1ef9f319e","head":{"label":"kumar303:example","ref":"example","sha":"5bdacca9465bd881395f4eced52a62d1ef9f319e","user":{"login":"kumar303","id":55398,"avatar_url":"https://avatars.githubusercontent.com/u/55398?v=3","gravatar_id":"","url":"https://api.github.com/users/kumar303","html_url":"https://github.com/kumar303","followers_url":"https://api.github.com/users/kumar303/followers","following_url":"https://api.github.com/users/kumar303/following{/other_user}","gists_url":"https://api.github.com/users/kumar303/gists{/gist_id}","starred_url":"https://api.github.com/users/kumar303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumar303/subscriptions","organizations_url":"https://api.github.com/users/kumar303/orgs","repos_url":"https://api.github.com/users/kumar303/repos","events_url":"https://api.github.com/users/kumar303/events{/privacy}","received_events_url":"https://api.github.com/users/kumar303/received_events","type":"User","site_admin":false},"repo":{"id":34483307,"name":"payments-env","full_name":"kumar303/payments-env","owner":{"login":"kumar303","id":55398,"avatar_url":"https://avatars.githubusercontent.com/u/55398?v=3","gravatar_id":"","url":"https://api.github.com/users/kumar303","html_url":"https://github.com/kumar303","followers_url":"https://api.github.com/users/kumar303/followers","following_url":"https://api.github.com/users/kumar303/following{/other_user}","gists_url":"https://api.github.com/users/kumar303/gists{/gist_id}","starred_url":"https://api.github.com/users/kumar303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumar303/subscriptions","organizations_url":"https://api.github.com/users/kumar303/orgs","repos_url":"https://api.github.com/users/kumar303/repos","events_url":"https://api.github.com/users/kumar303/events{/privacy}","received_events_url":"https://api.github.com/users/kumar303/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kumar303/payments-env","description":"Environment for running payments. See https://payments.readthedocs.org","fork":true,"url":"https://api.github.com/repos/kumar303/payments-env","forks_url":"https://api.github.com/repos/kumar303/payments-env/forks","keys_url":"https://api.github.com/repos/kumar303/payments-env/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kumar303/payments-env/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kumar303/payments-env/teams","hooks_url":"https://api.github.com/repos/kumar303/payments-env/hooks","issue_events_url":"https://api.github.com/repos/kumar303/payments-env/issues/events{/number}","events_url":"https://api.github.com/repos/kumar303/payments-env/events","assignees_url":"https://api.github.com/repos/kumar303/payments-env/assignees{/user}","branches_url":"https://api.github.com/repos/kumar303/payments-env/branches{/branch}","tags_url":"https://api.github.com/repos/kumar303/payments-env/tags","blobs_url":"https://api.github.com/repos/kumar303/payments-env/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kumar303/payments-env/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kumar303/payments-env/git/refs{/sha}","trees_url":"https://api.github.com/repos/kumar303/payments-env/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kumar303/payments-env/statuses/{sha}","languages_url":"https://api.github.com/repos/kumar303/payments-env/languages","stargazers_url":"https://api.github.com/repos/kumar303/payments-env/stargazers","contributors_url":"https://api.github.com/repos/kumar303/payments-env/contributors","subscribers_url":"https://api.github.com/repos/kumar303/payments-env/subscribers","subscription_url":"https://api.github.com/repos/kumar303/payments-env/subscription","commits_url":"https://api.github.com/repos/kumar303/payments-env/commits{/sha}","git_commits_url":"https://api.github.com/repos/kumar303/payments-env/git/commits{/sha}","comments_url":"https://api.github.com/repos/kumar303/payments-env/comments{/number}","issue_comment_url":"https://api.github.com/repos/kumar303/payments-env/issues/comments{/number}","contents_url":"https://api.github.com/repos/kumar303/payments-env/contents/{+path}","compare_url":"https://api.github.com/repos/kumar303/payments-env/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kumar303/payments-env/merges","archive_url":"https://api.github.com/repos/kumar303/payments-env/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kumar303/payments-env/downloads","issues_url":"https://api.github.com/repos/kumar303/payments-env/issues{/number}","pulls_url":"https://api.github.com/repos/kumar303/payments-env/pulls{/number}","milestones_url":"https://api.github.com/repos/kumar303/payments-env/milestones{/number}","notifications_url":"https://api.github.com/repos/kumar303/payments-env/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kumar303/payments-env/labels{/name}","releases_url":"https://api.github.com/repos/kumar303/payments-env/releases{/id}","created_at":"2015-04-23T21:48:27Z","updated_at":"2015-04-22T00:29:05Z","pushed_at":"2015-05-01T21:50:21Z","git_url":"git://github.com/kumar303/payments-env.git","ssh_url":"git@github.com:kumar303/payments-env.git","clone_url":"https://github.com/kumar303/payments-env.git","svn_url":"https://github.com/kumar303/payments-env","homepage":null,"size":76,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"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":"mozilla:master","ref":"master","sha":"3b920cf05a6a7b5ffc5d89b4fe415fd6e8df4598","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":34357801,"name":"payments-env","full_name":"mozilla/payments-env","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/payments-env","description":"Environment for running payments. See https://payments.readthedocs.org","fork":false,"url":"https://api.github.com/repos/mozilla/payments-env","forks_url":"https://api.github.com/repos/mozilla/payments-env/forks","keys_url":"https://api.github.com/repos/mozilla/payments-env/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/payments-env/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/payments-env/teams","hooks_url":"https://api.github.com/repos/mozilla/payments-env/hooks","issue_events_url":"https://api.github.com/repos/mozilla/payments-env/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/payments-env/events","assignees_url":"https://api.github.com/repos/mozilla/payments-env/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/payments-env/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/payments-env/tags","blobs_url":"https://api.github.com/repos/mozilla/payments-env/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/payments-env/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/payments-env/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/payments-env/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/payments-env/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/payments-env/languages","stargazers_url":"https://api.github.com/repos/mozilla/payments-env/stargazers","contributors_url":"https://api.github.com/repos/mozilla/payments-env/contributors","subscribers_url":"https://api.github.com/repos/mozilla/payments-env/subscribers","subscription_url":"https://api.github.com/repos/mozilla/payments-env/subscription","commits_url":"https://api.github.com/repos/mozilla/payments-env/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/payments-env/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/payments-env/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/payments-env/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/payments-env/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/payments-env/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/payments-env/merges","archive_url":"https://api.github.com/repos/mozilla/payments-env/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/payments-env/downloads","issues_url":"https://api.github.com/repos/mozilla/payments-env/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/payments-env/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/payments-env/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/payments-env/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/payments-env/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/payments-env/releases{/id}","created_at":"2015-04-21T23:36:06Z","updated_at":"2015-04-22T00:29:05Z","pushed_at":"2015-05-01T21:50:22Z","git_url":"git://github.com/mozilla/payments-env.git","ssh_url":"git@github.com:mozilla/payments-env.git","clone_url":"https://github.com/mozilla/payments-env.git","svn_url":"https://github.com/mozilla/payments-env","homepage":null,"size":155,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/payments-env/pulls/5"},"html":{"href":"https://github.com/mozilla/payments-env/pull/5"},"issue":{"href":"https://api.github.com/repos/mozilla/payments-env/issues/5"},"comments":{"href":"https://api.github.com/repos/mozilla/payments-env/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/payments-env/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/payments-env/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/payments-env/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/payments-env/statuses/5bdacca9465bd881395f4eced52a62d1ef9f319e"}}}}