{"action":"created","comment":{"url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/comments/30114514","id":30114514,"diff_hunk":"@@ -0,0 +1,242 @@\n+# -*- coding: utf-8 -*-\n+\n+import uuid\n+import base64\n+import time\n+import ConfigParser\n+from functools import wraps\n+import xml.parsers.expat\n+\n+from boto.dynamodb2.table import Table\n+from boto.dynamodb2 import connect_to_region\n+from boto.dynamodb2.exceptions import ItemNotFound\n+\n+#from chsdi.models.clientdata_dynamodb import get_table\n+\n+from boto.s3.connection import S3Connection\n+from boto.s3.key import Key\n+\n+from pyramid.view import view_config, view_defaults\n+import pyramid.httpexceptions as exc\n+from pyramid.response import Response\n+\n+from chsdi.lib.decorators import requires_authorization\n+\n+\n+def validate_kml_input():\n+    def decorator(func):\n+        @wraps(func)\n+        def wrapper(self, *args, **kwargs):\n+            if hasattr(self, 'request'):\n+                request = self.request\n+            else:\n+                request = self\n+\n+            MAX_FILE_SIZE = 1024 * 1024 * 2\n+\n+            if request.content_type != 'application/vnd.google-earth.kml+xml':\n+                raise exc.HTTPUnsupportedMediaType('Only KML file are accepted')\n+            try:\n+                data = request.body\n+                if len(data) > MAX_FILE_SIZE:\n+                    raise exc.HTTPRequestEntityTooLarge('File size exceed %s bytes' % MAX_FILE_SIZE)\n+                p = xml.parsers.expat.ParserCreate()\n+                p.Parse(data)\n+            except Exception:\n+                raise exc.HTTPUnsupportedMediaType('Only valid KML file are accepted')\n+\n+            return func(self, *args, **kwargs)\n+        return wrapper\n+    return decorator\n+\n+\n+def _get_dynamodb_table():\n+    PROFILE_NAME = 'Credentials'\n+    config = ConfigParser.ConfigParser()\n+    config.read([\"/etc/boto.cfg\"])\n+\n+    access_key = config.get(PROFILE_NAME, 'aws_access_key_id')\n+    secret_key = config.get(PROFILE_NAME, 'aws_secret_access_key')\n+\n+    conn = connect_to_region('eu-west-1', aws_access_key_id=access_key,\n+                             aws_secret_access_key=secret_key)\n+\n+    table = Table('geoadmin-file-storage', connection=conn)\n+    #table = get_table(table_name='geoadmin-file-storage')\n+\n+    return table\n+\n+\n+    # return get_table(table_name='geoadmin-file-storage')\n+\n+def _add_item(id, file_id=False):\n+    table = _get_dynamodb_table()\n+    try:\n+        table.put_item(\n+            data={\n+                'adminId': id,\n+                'fileId': file_id,\n+                'timestamp': time.strftime('%Y-%m-%d %X', time.localtime())\n+            }\n+        )\n+    except Exception as e:\n+            raise exc.HTTPBadRequest('Error during put item %s' % e)\n+    return True\n+\n+\n+def _is_admin_id(adminId):\n+    # TODO: search in database if it's an adminId\n+    table = _get_dynamodb_table()\n+    try:\n+        table.get_item(adminId=str(adminId))\n+    except ItemNotFound:\n+        return False\n+\n+    return True\n+\n+\n+def _get_file_id_from_admin_id(admin_id):\n+    # TODO: get the file id from database\n+    fileId = None\n+    table = _get_dynamodb_table()\n+    try:\n+        item = table.get_item(adminId=str(admin_id))\n+        fileId = item.get('fileId')\n+    except Exception as e:\n+        raise exc.HTTPBadRequest('The id %s doesn\\'t exist. Error is: %s' % (id, e))\n+    if fileId is None:\n+        return False\n+    return fileId\n+\n+\n+@view_defaults(renderer='jsonp', route_name='files')\n+class FileView(object):\n+\n+    def __init__(self, request):\n+        self.request = request\n+        self.bucket = self._get_bucket()\n+        if request.matched_route.name == 'files':\n+            self.admin_id = None\n+            id = request.matchdict['id']\n+            if _is_admin_id(id):\n+                self.admin_id = id\n+                self.file_id = _get_file_id_from_admin_id(self.admin_id)\n+            else:\n+                self.file_id = id\n+            try:\n+                key = self.bucket.get_key(self.file_id)\n+                if key is not None:\n+                    self.key = key\n+                else:\n+                    raise exc.HTTPNotFound('File %s not found' % self.file_id)\n+            except:\n+                raise exc.HTTPInternalServerError('Cannot access file with id=%s' % self.file_id)\n+\n+    def _get_uuid(self):\n+        return base64.urlsafe_b64encode(uuid.uuid4().bytes).replace('=', '')\n+\n+    def _get_bucket(self):\n+        # TODO use profile instead when correctly installed\n+        PROFILE_NAME = 'geoadmin-filestorage'","path":"chsdi/views/files.py","position":140,"original_position":140,"commit_id":"7f20d9240c74b46d85bb643de017ac884249c4d8","original_commit_id":"7f20d9240c74b46d85bb643de017ac884249c4d8","user":{"login":"loicgasser","id":3306154,"avatar_url":"https://avatars.githubusercontent.com/u/3306154?v=3","gravatar_id":"","url":"https://api.github.com/users/loicgasser","html_url":"https://github.com/loicgasser","followers_url":"https://api.github.com/users/loicgasser/followers","following_url":"https://api.github.com/users/loicgasser/following{/other_user}","gists_url":"https://api.github.com/users/loicgasser/gists{/gist_id}","starred_url":"https://api.github.com/users/loicgasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loicgasser/subscriptions","organizations_url":"https://api.github.com/users/loicgasser/orgs","repos_url":"https://api.github.com/users/loicgasser/repos","events_url":"https://api.github.com/users/loicgasser/events{/privacy}","received_events_url":"https://api.github.com/users/loicgasser/received_events","type":"User","site_admin":false},"body":"to put in settings as well","created_at":"2015-05-12T08:39:40Z","updated_at":"2015-05-12T08:39:40Z","html_url":"https://github.com/geoadmin/mf-chsdi3/pull/1401#discussion_r30114514","pull_request_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1401","_links":{"self":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/comments/30114514"},"html":{"href":"https://github.com/geoadmin/mf-chsdi3/pull/1401#discussion_r30114514"},"pull_request":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1401"}}},"pull_request":{"url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1401","id":34044623,"html_url":"https://github.com/geoadmin/mf-chsdi3/pull/1401","diff_url":"https://github.com/geoadmin/mf-chsdi3/pull/1401.diff","patch_url":"https://github.com/geoadmin/mf-chsdi3/pull/1401.patch","issue_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1401","number":1401,"state":"open","locked":false,"title":"[WIP] (KML) File storage","user":{"login":"procrastinatio","id":1236739,"avatar_url":"https://avatars.githubusercontent.com/u/1236739?v=3","gravatar_id":"","url":"https://api.github.com/users/procrastinatio","html_url":"https://github.com/procrastinatio","followers_url":"https://api.github.com/users/procrastinatio/followers","following_url":"https://api.github.com/users/procrastinatio/following{/other_user}","gists_url":"https://api.github.com/users/procrastinatio/gists{/gist_id}","starred_url":"https://api.github.com/users/procrastinatio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/procrastinatio/subscriptions","organizations_url":"https://api.github.com/users/procrastinatio/orgs","repos_url":"https://api.github.com/users/procrastinatio/repos","events_url":"https://api.github.com/users/procrastinatio/events{/privacy}","received_events_url":"https://api.github.com/users/procrastinatio/received_events","type":"User","site_admin":false},"body":"The following operations are supported:\r\n\r\n#### Create\r\n\r\n```\r\n$ curl -X POST -d @la_sagne.kml  -H \"Content-Type: application/xml\"  \\\r\n http://mf-chsdi3.dev.bgdi.ch/mom_kml_storage/files\r\n\r\n{\"adminId\":\"J3KMLz8CRyKjO-n1DhMm7w_admin\",\"fileId\":\"J3KMLz8CRyKjO-n1DhMm7w\"}\r\n```\r\n\r\n\r\n#### GET with file_id\r\n\r\n```\r\n$ curl http://mf-chsdi3.dev.bgdi.ch/mom_kml_storage/files/J3KMLz8CRyKjO-n1DhMm7w\r\n\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?><kml xmlns=\"http://www.opengis.net/kml/2.2\".....\r\n```\r\n\r\n#### GET with admin_id\r\n\r\n```\r\n$ curl http://mf-chsdi3.dev.bgdi.ch/mom_kml_storage/files/J3KMLz8CRyKjO-n1DhMm7w_admin\r\n\r\n{\"fileId\":\"J3KMLz8CRyKjO-n1DhMm7w\"}\r\n```\r\n\r\n#### POST with admin_id (UPDATE)\r\n\r\n```\r\n$ curl -v -X POST -d @la_sagne.kml  -H \"Content-Type: application/xml\"  \\\r\n http://mf-chsdi3.dev.bgdi.ch/mom_kml_storage/files/J3KMLz8CRyKjO-n1DhMm7w_admin\r\n\r\n{\"adminId\":\"J3KMLz8CRyKjO-n1DhMm7w_admin\",\"fileId\":\"J3KMLz8CRyKjO-n1DhMm7w\"}\r\n```\r\n\r\n#### POST with file_id (FORK)\r\n\r\n```\r\n$ curl -v -X POST -d @la_sagne.kml  -H \"Content-Type: application/xml\"  \\\r\n http://mf-chsdi3.dev.bgdi.ch/mom_kml_storage/files/J3KMLz8CRyKjO-n1DhMm7w\r\n\r\n{\"adminId\":\"hghdthtfghdh_admin\",\"fileId\":\"hghdthtfghdh\"}\r\n```\r\n#### DELETE with admin_id\r\n```\r\n$ curl -X DELETE http://mf-chsdi3.dev.bgdi.ch/mom_kml_storage/files/J3KMLz8CRyKjO-n1DhMm7w_admin\r\n\r\nHTTP/1.1 200 OK\r\n```\r\n\r\nCurrently, only KML files are supported. Files are check for correct 'Content-Type', size and well-formedness, and are stored into bucket `public.geo.admin.ch` (or the equivalent on stagging environnments)\r\n\r\n## TODO\r\n\r\n- [x] View for each operations\r\n- [x] Multiple buckets + Varnish settings\r\n- [ ] Full HTTPS check (new certificate for _public.geo.admin.ch_!)\r\n- [ ] Automatic tests\r\n- [ ] Proper credentials management\r\n- [ ] Bucket content and dynamodb backup\r\n- [ ] Proper scaling (how much traffic to we expect, how many files ?)\r\n\r\n## Backups\r\n\r\n* DynamoDB: see https://github.com/geoadmin/dynamodump/pull/15\r\n* S3 Bucket: `s3sync`\r\n","created_at":"2015-04-24T12:41:02Z","updated_at":"2015-05-12T08:39:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b16215857016b063628218921eb60e455e6c77a8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1401/commits","review_comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1401/comments","review_comment_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1401/comments","statuses_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/7f20d9240c74b46d85bb643de017ac884249c4d8","head":{"label":"geoadmin:mom_kml_storage","ref":"mom_kml_storage","sha":"7f20d9240c74b46d85bb643de017ac884249c4d8","user":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"repo":{"id":10399553,"name":"mf-chsdi3","full_name":"geoadmin/mf-chsdi3","owner":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geoadmin/mf-chsdi3","description":"api3.geo.admin.ch source code. ","fork":false,"url":"https://api.github.com/repos/geoadmin/mf-chsdi3","forks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/forks","keys_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/teams","hooks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/hooks","issue_events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/events{/number}","events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/events","assignees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/assignees{/user}","branches_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/branches{/branch}","tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/tags","blobs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/{sha}","languages_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/languages","stargazers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/stargazers","contributors_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contributors","subscribers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscribers","subscription_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscription","commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/comments{/number}","contents_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contents/{+path}","compare_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/merges","archive_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/downloads","issues_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues{/number}","pulls_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls{/number}","milestones_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/milestones{/number}","notifications_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/labels{/name}","releases_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/releases{/id}","created_at":"2013-05-31T06:59:44Z","updated_at":"2015-05-08T19:14:27Z","pushed_at":"2015-05-12T07:53:17Z","git_url":"git://github.com/geoadmin/mf-chsdi3.git","ssh_url":"git@github.com:geoadmin/mf-chsdi3.git","clone_url":"https://github.com/geoadmin/mf-chsdi3.git","svn_url":"https://github.com/geoadmin/mf-chsdi3","homepage":"api3.geo.admin.ch","size":242957,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":47,"forks":7,"open_issues":47,"watchers":9,"default_branch":"master"}},"base":{"label":"geoadmin:master","ref":"master","sha":"d561d7907f027a941ce12f6829d88bc84e845aea","user":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"repo":{"id":10399553,"name":"mf-chsdi3","full_name":"geoadmin/mf-chsdi3","owner":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geoadmin/mf-chsdi3","description":"api3.geo.admin.ch source code. ","fork":false,"url":"https://api.github.com/repos/geoadmin/mf-chsdi3","forks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/forks","keys_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/teams","hooks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/hooks","issue_events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/events{/number}","events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/events","assignees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/assignees{/user}","branches_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/branches{/branch}","tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/tags","blobs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/{sha}","languages_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/languages","stargazers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/stargazers","contributors_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contributors","subscribers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscribers","subscription_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscription","commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/comments{/number}","contents_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contents/{+path}","compare_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/merges","archive_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/downloads","issues_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues{/number}","pulls_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls{/number}","milestones_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/milestones{/number}","notifications_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/labels{/name}","releases_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/releases{/id}","created_at":"2013-05-31T06:59:44Z","updated_at":"2015-05-08T19:14:27Z","pushed_at":"2015-05-12T07:53:17Z","git_url":"git://github.com/geoadmin/mf-chsdi3.git","ssh_url":"git@github.com:geoadmin/mf-chsdi3.git","clone_url":"https://github.com/geoadmin/mf-chsdi3.git","svn_url":"https://github.com/geoadmin/mf-chsdi3","homepage":"api3.geo.admin.ch","size":242957,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":47,"forks":7,"open_issues":47,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1401"},"html":{"href":"https://github.com/geoadmin/mf-chsdi3/pull/1401"},"issue":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1401"},"comments":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1401/comments"},"review_comments":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1401/comments"},"review_comment":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1401/commits"},"statuses":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/7f20d9240c74b46d85bb643de017ac884249c4d8"}}}}