{"action":"created","comment":{"url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments/56279755","id":56279755,"diff_hunk":"@@ -0,0 +1,349 @@\n+import json\n+import unittest\n+\n+from django.test import TestCase, TransactionTestCase, Client\n+from django.contrib.auth.models import Group, User\n+\n+from hs_core.hydroshare import resource, create_resource, create_account\n+from hs_access_control.models import PrivilegeCodes\n+\n+class TestCollection(TransactionTestCase):\n+\n+    def setUp(self):\n+        self.api_client = Client()\n+        self.group, _ = Group.objects.get_or_create(name='Hydroshare Author')\n+\n+        self.user1 = create_account(\n+            'byu1@byu.edu',\n+            username='user1',\n+            password='mypassword1',\n+            first_name='myfirstname1',\n+            last_name='mylastname1',\n+            superuser=False,\n+            groups=[self.group]\n+        )\n+\n+        self.resCollection = create_resource(\n+            resource_type='CollectionResource',\n+            owner=self.user1,\n+            title='My Collection',\n+            keywords=['kw1', 'kw2'],\n+            metadata=[{\"rights\": {\"statement\": \"mystatement\", \"url\": \"http://www.google.com\"}},\n+                      {\"description\": {\"abstract\": \"myabstract\"}}\n+                      ]\n+        )\n+\n+        self.resGen1 = create_resource(\n+            resource_type='GenericResource',\n+            owner=self.user1,\n+            title='Gen 1',\n+            keywords=['kw1', 'kw2']\n+        )\n+\n+        self.resGen2 = create_resource(\n+            resource_type='GenericResource',\n+            owner=self.user1,\n+            title='Gen 2',\n+            keywords=['kw1', 'kw2']\n+        )\n+\n+        self.resGen3 = create_resource(\n+            resource_type='GenericResource',\n+            owner=self.user1,\n+            title='Gen 3',\n+            keywords=['kw1', 'kw2']\n+        )\n+\n+        self.user2 = create_account(\n+            'byu2@byu.edu',\n+            username='user2',\n+            password='mypassword2',\n+            first_name='myfirstname2',\n+            last_name='mylastname2',\n+            superuser=False,\n+            groups=[self.group]\n+        )\n+\n+        self.resGen4 = create_resource(\n+            resource_type='GenericResource',\n+            owner=self.user2,\n+            title='Gen 4',\n+            keywords=['kw1', 'kw2']\n+        )\n+\n+        self.resCollection2_user2 = create_resource(\n+            resource_type='CollectionResource',\n+            owner=self.user2,\n+            title='My Collection 2',\n+            keywords=['kw1', 'kw2'],\n+            metadata=[{\"rights\": {\"statement\": \"mystatement\", \"url\": \"http://www.google.com\"}},\n+                      {\"description\": {\"abstract\": \"myabstract\"}}\n+                      ]\n+        )\n+\n+        self.resGen5_user2 = create_resource(\n+            resource_type='GenericResource',\n+            owner=self.user2,\n+            title='Gen 5',\n+            keywords=['kw1', 'kw2'],\n+            metadata=[{\"rights\": {\"statement\": \"mystatement\", \"url\": \"http://www.google.com\"}},\n+                  {\"description\": {\"abstract\": \"myabstract\"}}\n+                  ]\n+        )\n+\n+        self.url_to_update_collection = \"/hsapi/_internal/{0}/update-collection/\"\n+        self.url_to_collection_member_permission = \"/hsapi/_internal/{0}/collection-member-permission/{1}/\"\n+        self.url_to_set_resource_flag = \"/hsapi/_internal/{0}/set-resource-flag/\"\n+        self.url_to_delete_resource = \"/hsapi/_internal/{0}/delete-resource/\"\n+\n+    @unittest.skip\n+    def test_views(self):\n+\n+        # test update_collection()\n+        # self.assertEqual(self.resCollection.metadata.collection.all().count(), 0)\n+        self.assertEqual(self.resCollection.metadata.collection, None)\n+        url_to_update_collection = self.url_to_update_collection.format(self.resCollection.short_id)\n+\n+        # anonymous user\n+        # should inform frontend error\n+        response = self.api_client.post(url_to_update_collection, {'resource_id_list': [self.resGen1.short_id, self.resGen2.short_id, self.resGen3.short_id]})\n+        resp_json = json.loads(response.content)\n+        self.assertEqual(resp_json[\"status\"], \"error\")\n+\n+        # user 1 login\n+        self.api_client.login(username='user1', password='mypassword1')\n+\n+        # add 3 private member resources\n+        # should inform frontend \"Insufficient to make public\"\n+        response = self.api_client.post(url_to_update_collection, {'resource_id_list': [self.resGen1.short_id, self.resGen2.short_id, self.resGen3.short_id]})\n+        resp_json = json.loads(response.content)\n+        self.assertEqual(resp_json[\"status\"], \"success\")\n+        self.assertEqual(resp_json[\"user_permission\"], \"Own\")\n+        self.assertEqual(resp_json[\"current_sharing_status\"], \"Private\")\n+        self.assertEqual(resp_json[\"new_sharing_status\"], \"\")\n+        self.assertEqual(resp_json[\"metadata_status\"], \"Insufficient to make public\")\n+        self.assertEqual(self.resCollection.metadata.collection.resources.all().count(), 3)\n+\n+        # make Gen1 public\n+        self.resGen1.raccess.public = True\n+        self.resGen1.raccess.save()\n+\n+        # make Gen2 public\n+        self.resGen2.raccess.public = True\n+        self.resGen2.raccess.save()\n+\n+        # make Gen3 discoverable\n+        self.resGen3.raccess.discoverable = True\n+        self.resGen3.raccess.save()\n+\n+        # re-add 3 public or discoverable member resources\n+        # should inform frontend \"Sufficient to make public\")\n+        response = self.api_client.post(url_to_update_collection, {'resource_id_list': [self.resGen1.short_id, self.resGen2.short_id, self.resGen3.short_id]})\n+        resp_json = json.loads(response.content)\n+        self.assertEqual(resp_json[\"status\"], \"success\")\n+        self.assertEqual(resp_json[\"metadata_status\"], \"Sufficient to make public\")\n+        self.assertEqual(self.resCollection.metadata.collection.resources.all().count(), 3)\n+\n+        # make Collection public\n+        self.resCollection.raccess.public = True\n+        self.resCollection.raccess.save()\n+        # make Gen3 private\n+        self.resGen3.raccess.public = False\n+        self.resGen3.raccess.discoverable = False\n+        self.resGen3.raccess.save()\n+        # re-add the 3 resources (2 public 1 private)\n+        # should inform frontend to downgrade to Private\n+        response = self.api_client.post(url_to_update_collection, {'resource_id_list': [self.resGen1.short_id, self.resGen2.short_id, self.resGen3.short_id]})\n+        resp_json = json.loads(response.content)\n+        self.assertEqual(resp_json[\"status\"], \"success\")\n+        self.assertEqual(resp_json[\"current_sharing_status\"], \"Public\")\n+        self.assertEqual(resp_json[\"new_sharing_status\"], \"Private\")\n+        self.assertEqual(resp_json[\"metadata_status\"], \"Insufficient to make public\")\n+        self.assertEqual(self.resCollection.metadata.collection.resources.all().count(), 3)\n+        self.assertEqual(self.resGen3.raccess.public, False)\n+        self.assertEqual(self.resGen3.raccess.discoverable, False)\n+\n+        # test collection_member_permission()\n+        # test User's permission over the collection contents\n+        user2_id = self.user2.id\n+        url_to_collection_member_permission = self.url_to_collection_member_permission = \\\n+            \"/hsapi/_internal/{0}/collection-member-permission/{1}/\".format(self.resCollection.short_id, user2_id)\n+        response = self.api_client.get(url_to_collection_member_permission)\n+        resp_json = json.loads(response.content)\n+        self.assertEqual(resp_json[\"status\"], \"success\")\n+        self.assertEqual(len(resp_json[\"no_permission_list\"]), 1)\n+\n+        # share this private collection with User2\n+        self.user1.uaccess.share_resource_with_user(self.resCollection, self.user2, PrivilegeCodes.CHANGE)\n+\n+        # User 1 logout\n+        self.api_client.logout()\n+\n+        # User 2 login\n+        self.api_client.login(username='user2', password='mypassword2')\n+\n+        # User 2 takes out private res 3\n+        # should inform frontend \"Sufficient to make public\"\n+        response = self.api_client.post(url_to_update_collection, {'resource_id_list': \\\n+                                            [self.resGen1.short_id, self.resGen2.short_id]})\n+        resp_json = json.loads(response.content)\n+        self.assertEqual(resp_json[\"status\"], \"success\")\n+        self.assertEqual(resp_json[\"user_permission\"], \"Edit\")\n+        self.assertEqual(resp_json[\"current_sharing_status\"], \"Private\")\n+        self.assertEqual(resp_json[\"new_sharing_status\"], \"\")\n+        self.assertEqual(resp_json[\"metadata_status\"], \"Sufficient to make public\")\n+        self.assertEqual(self.resCollection.metadata.collection.resources.all().count(), 2)\n+\n+        # make User 2's Gen4 discoverable\n+        self.resGen4.raccess.discoverable = True\n+        self.resGen4.raccess.save()\n+\n+        # User 2 adds his dicoverable res 4\n+        response = self.api_client.post(url_to_update_collection, {'resource_id_list': \\\n+                        [self.resGen1.short_id, self.resGen2.short_id, self.resGen4.short_id]})\n+        resp_json = json.loads(response.content)\n+        self.assertEqual(resp_json[\"status\"], \"success\")\n+        self.assertEqual(resp_json[\"user_permission\"], \"Edit\")\n+        self.assertEqual(resp_json[\"current_sharing_status\"], \"Private\")\n+        self.assertEqual(resp_json[\"new_sharing_status\"], \"\")\n+        self.assertEqual(resp_json[\"metadata_status\"], \"Sufficient to make public\")\n+        self.assertEqual(self.resCollection.metadata.collection.resources.all().count(), 3)\n+\n+    def test_custom_logic_in_hs_core_1(self):\n+\n+        # this func tests that the public collection should downgrade to private if its any member resource is changed to private\n+\n+        self.api_client.logout()\n+        # user 2 login\n+        self.api_client.login(username='user2', password='mypassword2')\n+\n+        ##### test custom logic for collection in hs_core\n+        # check gen res 5 current sharing status --> private\n+        self.assertEqual(self.resGen5_user2.raccess.public, False)\n+        self.assertEqual(self.resGen5_user2.raccess.discoverable, False)\n+\n+        # make gen res 5 public (not working because it does not meet public precondition: no resouece file in generic res)\n+        # url_to_set_resource_flag_for_resGen5 = self.url_to_set_resource_flag.format(self.resGen5_user2.short_id)\n+        # response = self.api_client.post(url_to_set_resource_flag_for_resGen5, {'t': 'make_public'}, HTTP_REFERER='http://foo/bar')\n+\n+        # make gen res 5 public manaully\n+        self.resGen5_user2.raccess.public = True\n+        self.resGen5_user2.raccess.discoverable = True\n+        self.resGen5_user2.raccess.save()\n+\n+        # check gen res 5 current sharing status --> public\n+        self.assertEqual(self.resGen5_user2.raccess.public, True)\n+        self.assertEqual(self.resGen5_user2.raccess.discoverable, True)\n+\n+        # check collection current sharing status --> private\n+        self.assertEqual(self.resCollection2_user2.raccess.public, False)\n+        self.assertEqual(self.resCollection2_user2.raccess.discoverable, False)\n+\n+        # add one public gen res 5into collection\n+        url_to_update_collection_2 = self.url_to_update_collection.format(self.resCollection2_user2.short_id)\n+        response = self.api_client.post(url_to_update_collection_2, {'resource_id_list': [self.resGen5_user2.short_id]})\n+        resp_json = json.loads(response.content)\n+        self.assertEqual(resp_json[\"status\"], \"success\")\n+        self.assertEqual(resp_json[\"metadata_status\"], \"Sufficient to make public\")\n+        self.assertEqual(self.resCollection2_user2.metadata.collection.resources.all().count(), 1)\n+\n+        # manually make collection public\n+        self.resCollection2_user2.raccess.public = True\n+        self.resCollection2_user2.raccess.discoverable = True\n+        self.resCollection2_user2.raccess.save()\n+\n+        # check collection current sharing status --> public\n+        self.assertEqual(self.resCollection2_user2.raccess.public, True)\n+        self.assertEqual(self.resCollection2_user2.raccess.discoverable, True)\n+\n+        f=open(\"abcde2.txt\", 'w', 0)\n+        f.write(\"res id {}\\n\".format(self.resGen5_user2.short_id))\n+        f.write(\"collection id {}\\n\".format(self.resCollection2_user2.short_id))\n+        f.close()\n+\n+        # downgrade res gen 5 to private\n+        url_to_set_resource_flag_for_resGen5 = self.url_to_set_resource_flag.format(self.resGen5_user2.short_id)\n+        response = self.api_client.post(url_to_set_resource_flag_for_resGen5, {'t': 'make_private'}, HTTP_REFERER='http://foo/bar')\n+\n+        # # check gen res 5 new sharing status --> private\n+        # self.assertEqual(self.resGen5_user2.raccess.public, False)\n+        # self.assertEqual(self.resGen5_user2.raccess.discoverable, False)\n+\n+        # # check collection 2 new status --> private\n+        # self.assertEqual(self.resCollection2_user2.raccess.public, False)\n+        # self.assertEqual(self.resCollection2_user2.raccess.discoverable, False)\n+\n+    def test_custom_logic_in_hs_core_1_result(self):","path":"hs_collection_resource/tests/test_collection.py","position":276,"original_position":276,"commit_id":"51182516ff257064e2ef40de20da0595fb43b967","original_commit_id":"51182516ff257064e2ef40de20da0595fb43b967","user":{"login":"pkdash","id":2523434,"avatar_url":"https://avatars.githubusercontent.com/u/2523434?v=3","gravatar_id":"","url":"https://api.github.com/users/pkdash","html_url":"https://github.com/pkdash","followers_url":"https://api.github.com/users/pkdash/followers","following_url":"https://api.github.com/users/pkdash/following{/other_user}","gists_url":"https://api.github.com/users/pkdash/gists{/gist_id}","starred_url":"https://api.github.com/users/pkdash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkdash/subscriptions","organizations_url":"https://api.github.com/users/pkdash/orgs","repos_url":"https://api.github.com/users/pkdash/repos","events_url":"https://api.github.com/users/pkdash/events{/privacy}","received_events_url":"https://api.github.com/users/pkdash/received_events","type":"User","site_admin":false},"body":"Not sure if this test is really testing anything.","created_at":"2016-03-16T04:13:37Z","updated_at":"2016-03-16T04:13:37Z","html_url":"https://github.com/hydroshare/hydroshare/pull/1000#discussion_r56279755","pull_request_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1000","_links":{"self":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments/56279755"},"html":{"href":"https://github.com/hydroshare/hydroshare/pull/1000#discussion_r56279755"},"pull_request":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1000"}}},"pull_request":{"url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1000","id":60226071,"html_url":"https://github.com/hydroshare/hydroshare/pull/1000","diff_url":"https://github.com/hydroshare/hydroshare/pull/1000.diff","patch_url":"https://github.com/hydroshare/hydroshare/pull/1000.patch","issue_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/1000","number":1000,"state":"open","locked":false,"title":"839 collection resource type phase 1","user":{"login":"zhiyuli","id":10070599,"avatar_url":"https://avatars.githubusercontent.com/u/10070599?v=3","gravatar_id":"","url":"https://api.github.com/users/zhiyuli","html_url":"https://github.com/zhiyuli","followers_url":"https://api.github.com/users/zhiyuli/followers","following_url":"https://api.github.com/users/zhiyuli/following{/other_user}","gists_url":"https://api.github.com/users/zhiyuli/gists{/gist_id}","starred_url":"https://api.github.com/users/zhiyuli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhiyuli/subscriptions","organizations_url":"https://api.github.com/users/zhiyuli/orgs","repos_url":"https://api.github.com/users/zhiyuli/repos","events_url":"https://api.github.com/users/zhiyuli/events{/privacy}","received_events_url":"https://api.github.com/users/zhiyuli/received_events","type":"User","site_admin":false},"body":"just sync'd with latest dev; fixed some conflicts due to recent changes to generic templates\r\n\r\n@alvacouch @danames @SarvaPulla \r\nI think we can start to simplify/refactor the collection. I will write some comments on current code explaining what it is doing. \r\n","created_at":"2016-02-22T19:25:14Z","updated_at":"2016-03-16T04:13:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5edc830e67b72c22618e92d1bbb0b18d5cc4c82f","assignee":{"login":"pkdash","id":2523434,"avatar_url":"https://avatars.githubusercontent.com/u/2523434?v=3","gravatar_id":"","url":"https://api.github.com/users/pkdash","html_url":"https://github.com/pkdash","followers_url":"https://api.github.com/users/pkdash/followers","following_url":"https://api.github.com/users/pkdash/following{/other_user}","gists_url":"https://api.github.com/users/pkdash/gists{/gist_id}","starred_url":"https://api.github.com/users/pkdash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkdash/subscriptions","organizations_url":"https://api.github.com/users/pkdash/orgs","repos_url":"https://api.github.com/users/pkdash/repos","events_url":"https://api.github.com/users/pkdash/events{/privacy}","received_events_url":"https://api.github.com/users/pkdash/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1000/commits","review_comments_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1000/comments","review_comment_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/1000/comments","statuses_url":"https://api.github.com/repos/hydroshare/hydroshare/statuses/51182516ff257064e2ef40de20da0595fb43b967","head":{"label":"hydroshare:839-collection-resource-type-phase-1","ref":"839-collection-resource-type-phase-1","sha":"51182516ff257064e2ef40de20da0595fb43b967","user":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"repo":{"id":24703136,"name":"hydroshare","full_name":"hydroshare/hydroshare","owner":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hydroshare/hydroshare","description":"HydroShare is a collaborative website being developed for better access to data and models in the hydrologic sciences. ","fork":false,"url":"https://api.github.com/repos/hydroshare/hydroshare","forks_url":"https://api.github.com/repos/hydroshare/hydroshare/forks","keys_url":"https://api.github.com/repos/hydroshare/hydroshare/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hydroshare/hydroshare/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hydroshare/hydroshare/teams","hooks_url":"https://api.github.com/repos/hydroshare/hydroshare/hooks","issue_events_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/events{/number}","events_url":"https://api.github.com/repos/hydroshare/hydroshare/events","assignees_url":"https://api.github.com/repos/hydroshare/hydroshare/assignees{/user}","branches_url":"https://api.github.com/repos/hydroshare/hydroshare/branches{/branch}","tags_url":"https://api.github.com/repos/hydroshare/hydroshare/tags","blobs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hydroshare/hydroshare/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/refs{/sha}","trees_url":"https://api.github.com/repos/hydroshare/hydroshare/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hydroshare/hydroshare/statuses/{sha}","languages_url":"https://api.github.com/repos/hydroshare/hydroshare/languages","stargazers_url":"https://api.github.com/repos/hydroshare/hydroshare/stargazers","contributors_url":"https://api.github.com/repos/hydroshare/hydroshare/contributors","subscribers_url":"https://api.github.com/repos/hydroshare/hydroshare/subscribers","subscription_url":"https://api.github.com/repos/hydroshare/hydroshare/subscription","commits_url":"https://api.github.com/repos/hydroshare/hydroshare/commits{/sha}","git_commits_url":"https://api.github.com/repos/hydroshare/hydroshare/git/commits{/sha}","comments_url":"https://api.github.com/repos/hydroshare/hydroshare/comments{/number}","issue_comment_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/comments{/number}","contents_url":"https://api.github.com/repos/hydroshare/hydroshare/contents/{+path}","compare_url":"https://api.github.com/repos/hydroshare/hydroshare/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hydroshare/hydroshare/merges","archive_url":"https://api.github.com/repos/hydroshare/hydroshare/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hydroshare/hydroshare/downloads","issues_url":"https://api.github.com/repos/hydroshare/hydroshare/issues{/number}","pulls_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls{/number}","milestones_url":"https://api.github.com/repos/hydroshare/hydroshare/milestones{/number}","notifications_url":"https://api.github.com/repos/hydroshare/hydroshare/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hydroshare/hydroshare/labels{/name}","releases_url":"https://api.github.com/repos/hydroshare/hydroshare/releases{/id}","deployments_url":"https://api.github.com/repos/hydroshare/hydroshare/deployments","created_at":"2014-10-02T02:19:41Z","updated_at":"2016-03-01T10:06:38Z","pushed_at":"2016-03-16T02:04:58Z","git_url":"git://github.com/hydroshare/hydroshare.git","ssh_url":"git@github.com:hydroshare/hydroshare.git","clone_url":"https://github.com/hydroshare/hydroshare.git","svn_url":"https://github.com/hydroshare/hydroshare","homepage":"https://www.hydroshare.org","size":84235,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":229,"forks":2,"open_issues":229,"watchers":13,"default_branch":"develop"}},"base":{"label":"hydroshare:develop","ref":"develop","sha":"b860b1ca9077203d05c56c4595b5d4980a16ea3a","user":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"repo":{"id":24703136,"name":"hydroshare","full_name":"hydroshare/hydroshare","owner":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hydroshare/hydroshare","description":"HydroShare is a collaborative website being developed for better access to data and models in the hydrologic sciences. ","fork":false,"url":"https://api.github.com/repos/hydroshare/hydroshare","forks_url":"https://api.github.com/repos/hydroshare/hydroshare/forks","keys_url":"https://api.github.com/repos/hydroshare/hydroshare/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hydroshare/hydroshare/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hydroshare/hydroshare/teams","hooks_url":"https://api.github.com/repos/hydroshare/hydroshare/hooks","issue_events_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/events{/number}","events_url":"https://api.github.com/repos/hydroshare/hydroshare/events","assignees_url":"https://api.github.com/repos/hydroshare/hydroshare/assignees{/user}","branches_url":"https://api.github.com/repos/hydroshare/hydroshare/branches{/branch}","tags_url":"https://api.github.com/repos/hydroshare/hydroshare/tags","blobs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hydroshare/hydroshare/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/refs{/sha}","trees_url":"https://api.github.com/repos/hydroshare/hydroshare/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hydroshare/hydroshare/statuses/{sha}","languages_url":"https://api.github.com/repos/hydroshare/hydroshare/languages","stargazers_url":"https://api.github.com/repos/hydroshare/hydroshare/stargazers","contributors_url":"https://api.github.com/repos/hydroshare/hydroshare/contributors","subscribers_url":"https://api.github.com/repos/hydroshare/hydroshare/subscribers","subscription_url":"https://api.github.com/repos/hydroshare/hydroshare/subscription","commits_url":"https://api.github.com/repos/hydroshare/hydroshare/commits{/sha}","git_commits_url":"https://api.github.com/repos/hydroshare/hydroshare/git/commits{/sha}","comments_url":"https://api.github.com/repos/hydroshare/hydroshare/comments{/number}","issue_comment_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/comments{/number}","contents_url":"https://api.github.com/repos/hydroshare/hydroshare/contents/{+path}","compare_url":"https://api.github.com/repos/hydroshare/hydroshare/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hydroshare/hydroshare/merges","archive_url":"https://api.github.com/repos/hydroshare/hydroshare/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hydroshare/hydroshare/downloads","issues_url":"https://api.github.com/repos/hydroshare/hydroshare/issues{/number}","pulls_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls{/number}","milestones_url":"https://api.github.com/repos/hydroshare/hydroshare/milestones{/number}","notifications_url":"https://api.github.com/repos/hydroshare/hydroshare/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hydroshare/hydroshare/labels{/name}","releases_url":"https://api.github.com/repos/hydroshare/hydroshare/releases{/id}","deployments_url":"https://api.github.com/repos/hydroshare/hydroshare/deployments","created_at":"2014-10-02T02:19:41Z","updated_at":"2016-03-01T10:06:38Z","pushed_at":"2016-03-16T02:04:58Z","git_url":"git://github.com/hydroshare/hydroshare.git","ssh_url":"git@github.com:hydroshare/hydroshare.git","clone_url":"https://github.com/hydroshare/hydroshare.git","svn_url":"https://github.com/hydroshare/hydroshare","homepage":"https://www.hydroshare.org","size":84235,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":229,"forks":2,"open_issues":229,"watchers":13,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1000"},"html":{"href":"https://github.com/hydroshare/hydroshare/pull/1000"},"issue":{"href":"https://api.github.com/repos/hydroshare/hydroshare/issues/1000"},"comments":{"href":"https://api.github.com/repos/hydroshare/hydroshare/issues/1000/comments"},"review_comments":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1000/comments"},"review_comment":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1000/commits"},"statuses":{"href":"https://api.github.com/repos/hydroshare/hydroshare/statuses/51182516ff257064e2ef40de20da0595fb43b967"}}}}