{"action":"created","comment":{"url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/pulls/comments/45295034","id":45295034,"diff_hunk":"@@ -0,0 +1,319 @@\n+package org.sagebionetworks.repo.model.dbo.dao.discussion;\n+\n+import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.*;\n+\n+import java.sql.Blob;\n+import java.sql.PreparedStatement;\n+import java.sql.ResultSet;\n+import java.sql.SQLException;\n+import java.util.ArrayList;\n+import java.util.Arrays;\n+import java.util.Date;\n+import java.util.List;\n+import java.util.UUID;\n+\n+import org.sagebionetworks.ids.IdGenerator;\n+import org.sagebionetworks.ids.IdGenerator.TYPE;\n+import org.sagebionetworks.reflection.model.PaginatedResults;\n+import org.sagebionetworks.repo.model.DiscussionThreadDAO;\n+import org.sagebionetworks.repo.model.dbo.DBOBasicDao;\n+import org.sagebionetworks.repo.model.dbo.persistence.discussion.DBODiscussionThread;\n+import org.sagebionetworks.repo.model.dbo.persistence.discussion.DiscussionThreadUtils;\n+import org.sagebionetworks.repo.model.discussion.DiscussionOrder;\n+import org.sagebionetworks.repo.model.discussion.DiscussionThreadBundle;\n+import org.sagebionetworks.repo.transactions.WriteTransaction;\n+import org.sagebionetworks.repo.web.NotFoundException;\n+import org.sagebionetworks.util.ValidateArgument;\n+import org.springframework.beans.factory.annotation.Autowired;\n+import org.springframework.jdbc.core.BatchPreparedStatementSetter;\n+import org.springframework.jdbc.core.JdbcTemplate;\n+import org.springframework.jdbc.core.RowMapper;\n+\n+public class DBODiscussionThreadDAOImpl implements DiscussionThreadDAO {\n+\n+\t@Autowired\n+\tprivate JdbcTemplate jdbcTemplate;\n+\t@Autowired\n+\tprivate DBOBasicDao basicDao;\n+\t@Autowired\n+\tprivate IdGenerator idGenerator;\n+\n+\tprivate RowMapper<DiscussionThreadBundle> DISCUSSION_THREAD_BUNDLE_ROW_MAPPER = new RowMapper<DiscussionThreadBundle>(){\n+\n+\t\t@Override\n+\t\tpublic DiscussionThreadBundle mapRow(ResultSet rs, int rowNum)\n+\t\t\t\tthrows SQLException {\n+\t\t\tDiscussionThreadBundle dbo = new DiscussionThreadBundle();\n+\t\t\tdbo.setId(Long.toString(rs.getLong(COL_DISCUSSION_THREAD_ID)));\n+\t\t\tdbo.setForumId(Long.toString(rs.getLong(COL_DISCUSSION_THREAD_FORUM_ID)));\n+\t\t\tBlob titleBlob = rs.getBlob(COL_DISCUSSION_THREAD_TITLE);\n+\t\t\tdbo.setTitle(DiscussionThreadUtils.decompressUTF8(titleBlob.getBytes(1, (int) titleBlob.length())));\n+\t\t\tdbo.setCreatedOn(new Date(rs.getLong(COL_DISCUSSION_THREAD_CREATED_ON)));\n+\t\t\tdbo.setCreatedBy(Long.toString(rs.getLong(COL_DISCUSSION_THREAD_CREATED_BY)));\n+\t\t\tdbo.setModifiedOn(new Date(rs.getLong(COL_DISCUSSION_THREAD_MODIFIED_ON)));\n+\t\t\tdbo.setMessageUrl(rs.getString(COL_DISCUSSION_THREAD_MESSAGE_URL));\n+\t\t\tdbo.setIsEdited(rs.getBoolean(COL_DISCUSSION_THREAD_IS_EDITED));\n+\t\t\tdbo.setIsDeleted(rs.getBoolean(COL_DISCUSSION_THREAD_IS_DELETED));\n+\t\t\tlong numberOfViews = rs.getLong(COL_DISCUSSION_THREAD_STATS_NUMBER_OF_VIEWS);\n+\t\t\tif (rs.wasNull()) {\n+\t\t\t\tdbo.setNumberOfViews(0L);\n+\t\t\t} else {\n+\t\t\t\tdbo.setNumberOfViews(numberOfViews);\n+\t\t\t}\n+\t\t\tlong numberOfReplies = rs.getLong(COL_DISCUSSION_THREAD_STATS_NUMBER_OF_REPLIES);\n+\t\t\tif (rs.wasNull()) {\n+\t\t\t\tdbo.setNumberOfReplies(0L);\n+\t\t\t} else {\n+\t\t\t\tdbo.setNumberOfReplies(numberOfReplies);\n+\t\t\t}\n+\t\t\tlong lastActivity = rs.getLong(COL_DISCUSSION_THREAD_STATS_LAST_ACTIVITY);\n+\t\t\tif (rs.wasNull()) {\n+\t\t\t\tdbo.setLastActivity(dbo.getModifiedOn());\n+\t\t\t} else {\n+\t\t\t\tdbo.setLastActivity(new Date(lastActivity));\n+\t\t\t}\n+\t\t\tBlob activeAuthorsBlob = rs.getBlob(COL_DISCUSSION_THREAD_STATS_ACTIVE_AUTHORS);\n+\t\t\tif (rs.wasNull()) {\n+\t\t\t\tdbo.setActiveAuthors(Arrays.asList(dbo.getCreatedBy()));\n+\t\t\t} else {\n+\t\t\t\tString listString = DiscussionThreadUtils.decompressUTF8(activeAuthorsBlob.getBytes(1, (int) activeAuthorsBlob.length()));\n+\t\t\t\tdbo.setActiveAuthors(DiscussionThreadUtils.createList(listString));\n+\t\t\t}\n+\t\t\treturn dbo;\n+\t\t}\n+\t};\n+\n+\tprivate static final String SQL_MARK_THREAD_AS_DELETED = \"UPDATE \"+TABLE_DISCUSSION_THREAD\n+\t\t\t+\" SET \"+COL_DISCUSSION_THREAD_IS_DELETED+\" = TRUE, \"\n+\t\t\t+COL_DISCUSSION_THREAD_ETAG+\" = ?, \"\n+\t\t\t+COL_DISCUSSION_THREAD_MODIFIED_ON+\" = ?\"\n+\t\t\t+\" WHERE \"+COL_DISCUSSION_THREAD_ID+\" = ?\";\n+\tprivate static final String SQL_UPDATE_TITLE = \"UPDATE \"+TABLE_DISCUSSION_THREAD\n+\t\t\t+\" SET \"+COL_DISCUSSION_THREAD_TITLE+\" = ?, \"\n+\t\t\t+COL_DISCUSSION_THREAD_IS_EDITED+\" = TRUE, \"\n+\t\t\t+COL_DISCUSSION_THREAD_ETAG+\" = ?, \"\n+\t\t\t+COL_DISCUSSION_THREAD_MODIFIED_ON+\" = ?\"\n+\t\t\t+\" WHERE \"+COL_DISCUSSION_THREAD_ID+\" = ?\";\n+\tprivate static final String SQL_UPDATE_MESSAGE_URL = \"UPDATE \"+TABLE_DISCUSSION_THREAD\n+\t\t\t+\" SET \"+COL_DISCUSSION_THREAD_MESSAGE_URL+\" = ?, \"\n+\t\t\t+COL_DISCUSSION_THREAD_IS_EDITED+\" = TRUE, \"\n+\t\t\t+COL_DISCUSSION_THREAD_ETAG+\" = ?, \"\n+\t\t\t+COL_DISCUSSION_THREAD_MODIFIED_ON+\" = ?\"\n+\t\t\t+\" WHERE \"+COL_DISCUSSION_THREAD_ID+\" = ?\";\n+\n+\tprivate static final String SELECT_THREAD_BUNDLE = \"SELECT \"\n+\t\t\t+TABLE_DISCUSSION_THREAD+\".\"+COL_DISCUSSION_THREAD_ID+\" AS ID, \"\n+\t\t\t+COL_DISCUSSION_THREAD_FORUM_ID+\", \"\n+\t\t\t+COL_DISCUSSION_THREAD_TITLE+\", \"\n+\t\t\t+COL_DISCUSSION_THREAD_CREATED_ON+\", \"\n+\t\t\t+COL_DISCUSSION_THREAD_CREATED_BY+\", \"\n+\t\t\t+COL_DISCUSSION_THREAD_MODIFIED_ON+\", \"\n+\t\t\t+COL_DISCUSSION_THREAD_MESSAGE_URL+\", \"\n+\t\t\t+COL_DISCUSSION_THREAD_IS_EDITED+\", \"\n+\t\t\t+COL_DISCUSSION_THREAD_IS_DELETED+\", \"\n+\t\t\t+COL_DISCUSSION_THREAD_STATS_NUMBER_OF_VIEWS+\", \"\n+\t\t\t+COL_DISCUSSION_THREAD_STATS_NUMBER_OF_REPLIES+\", \"\n+\t\t\t+\"IFNULL(\"+COL_DISCUSSION_THREAD_STATS_LAST_ACTIVITY+\", \"+COL_DISCUSSION_THREAD_MODIFIED_ON+\") AS \"+COL_DISCUSSION_THREAD_STATS_LAST_ACTIVITY+\", \"\n+\t\t\t+COL_DISCUSSION_THREAD_STATS_ACTIVE_AUTHORS\n+\t\t\t+\" FROM \"+TABLE_DISCUSSION_THREAD\n+\t\t\t+\" LEFT OUTER JOIN \"+TABLE_DISCUSSION_THREAD_STATS\n+\t\t\t+\" ON \"+TABLE_DISCUSSION_THREAD+\".\"+COL_DISCUSSION_THREAD_ID\n+\t\t\t+\" = \"+TABLE_DISCUSSION_THREAD_STATS+\".\"+COL_DISCUSSION_THREAD_STATS_THREAD_ID;\n+\tprivate static final String SQL_SELECT_THREAD_BY_ID = SELECT_THREAD_BUNDLE\n+\t\t\t+\" WHERE \"+COL_DISCUSSION_THREAD_ID+\" = ?\";\n+\tprivate static final String SQL_SELECT_THREAD_COUNT = \"SELECT COUNT(*)\"\n+\t\t\t+\" FROM \"+TABLE_DISCUSSION_THREAD\n+\t\t\t+\" WHERE \"+COL_DISCUSSION_THREAD_FORUM_ID+\" = ?\";\n+\tprivate static final String SQL_SELECT_THREADS_BY_FORUM_ID = SELECT_THREAD_BUNDLE\n+\t\t\t+\" WHERE \"+COL_DISCUSSION_THREAD_FORUM_ID+\" = ?\";\n+\tprivate static final String ORDER_BY_LAST_ACTIVITY = \" ORDER BY \"+COL_DISCUSSION_THREAD_STATS_LAST_ACTIVITY+\" DESC\";\n+\tprivate static final String ORDER_BY_NUMBER_OF_VIEWS = \" ORDER BY \"+COL_DISCUSSION_THREAD_STATS_NUMBER_OF_VIEWS+\" DESC\";\n+\tprivate static final String ORDER_BY_NUMBER_OF_REPLIES = \" ORDER BY \"+COL_DISCUSSION_THREAD_STATS_NUMBER_OF_REPLIES+\" DESC\";\n+\tpublic static final Integer MAX_LIMIT = 100;\n+\tprivate static final String DEFAULT_LIMIT = \" LIMIT \"+MAX_LIMIT+\" OFFSET 0\";\n+\n+\tprivate static final String SQL_UPDATE_THREAD_VIEW_TABLE = \"INSERT IGNORE INTO \"\n+\t\t\t+TABLE_DISCUSSION_THREAD_VIEW+\"(\"\n+\t\t\t+COL_DISCUSSION_THREAD_VIEW_ID+\",\"\n+\t\t\t+COL_DISCUSSION_THREAD_VIEW_THREAD_ID+\",\"\n+\t\t\t+COL_DISCUSSION_THREAD_VIEW_USER_ID\n+\t\t\t+\") VALUES (?,?,?)\";\n+\tprivate static final String SQL_SELECT_THREAD_VIEW_COUNT = \"SELECT COUNT(*)\"\n+\t\t\t+\" FROM \"+TABLE_DISCUSSION_THREAD_VIEW\n+\t\t\t+\" WHERE \"+COL_DISCUSSION_THREAD_VIEW_THREAD_ID+\" = ?\";\n+\n+\tprivate static final String SQL_UPDATE_THREAD_STATS_VIEWS = \"UPDATE \"+TABLE_DISCUSSION_THREAD_STATS\n+\t\t\t+\" SET \"+COL_DISCUSSION_THREAD_STATS_NUMBER_OF_VIEWS+\" = ? \"\n+\t\t\t+\" WHERE \"+COL_DISCUSSION_THREAD_STATS_THREAD_ID+\" = ?\";\n+\tprivate static final String SQL_UPDATE_THREAD_STATS_REPLIES = \"UPDATE \"+TABLE_DISCUSSION_THREAD_STATS\n+\t\t\t+\" SET \"+COL_DISCUSSION_THREAD_STATS_NUMBER_OF_REPLIES+\" = ? \"\n+\t\t\t+\" WHERE \"+COL_DISCUSSION_THREAD_STATS_THREAD_ID+\" = ?\";\n+\tprivate static final String SQL_UPDATE_THREAD_STATS_LAST_ACTIVITY = \"UPDATE \"+TABLE_DISCUSSION_THREAD_STATS\n+\t\t\t+\" SET \"+COL_DISCUSSION_THREAD_STATS_LAST_ACTIVITY+\" = ? \"\n+\t\t\t+\" WHERE \"+COL_DISCUSSION_THREAD_STATS_THREAD_ID+\" = ?\";\n+\tprivate static final String SQL_UPDATE_THREAD_STATS_ACTIVE_AUTHORS = \"UPDATE \"+TABLE_DISCUSSION_THREAD_STATS\n+\t\t\t+\" SET \"+COL_DISCUSSION_THREAD_STATS_ACTIVE_AUTHORS+\" = ? \"\n+\t\t\t+\" WHERE \"+COL_DISCUSSION_THREAD_STATS_THREAD_ID+\" = ?\";\n+\n+\t@WriteTransaction\n+\t@Override\n+\tpublic DiscussionThreadBundle createThread(String forumId, String title, String messageUrl, long userId) {\n+\t\tif (forumId == null || title == null || messageUrl == null) \n+\t\t\tthrow new IllegalArgumentException(\"All parameters must be initialized.\");\n+\t\tLong id = idGenerator.generateNewId(TYPE.DISCUSSION_THREAD_ID);\n+\t\tString etag = UUID.randomUUID().toString();\n+\t\tDBODiscussionThread dbo = DiscussionThreadUtils.createDBO(forumId, title, messageUrl, userId, id.toString(), etag);\n+\t\tbasicDao.createNew(dbo);\n+\t\treturn getThread(id, userId);\n+\t}\n+\n+\t@Override\n+\tpublic DiscussionThreadBundle getThread(long threadId, long userId) {\n+\t\tupdateThreadView(threadId, userId);\n+\t\treturn doGet(threadId);\n+\t}\n+\n+\t@Override\n+\tpublic void updateThreadView(long threadId, long userId) {\n+\t\tlong id = idGenerator.generateNewId(TYPE.DISCUSSION_THREAD_VIEW_ID);\n+\t\tjdbcTemplate.update(SQL_UPDATE_THREAD_VIEW_TABLE, id, threadId, userId);\n+\t}\n+\n+\t/**\n+\t * getting the DiscussionThreadBundle object\n+\t * \n+\t * @param threadId\n+\t * @return\n+\t */\n+\tprivate DiscussionThreadBundle doGet(long threadId) {\n+\t\tList<DiscussionThreadBundle> results = jdbcTemplate.query(SQL_SELECT_THREAD_BY_ID, DISCUSSION_THREAD_BUNDLE_ROW_MAPPER, threadId);\n+\t\tif (results.size() != 1) {\n+\t\t\tthrow new NotFoundException();\n+\t\t}\n+\t\treturn results.get(0);\n+\t}\n+\n+\t@Override\n+\tpublic PaginatedResults<DiscussionThreadBundle> getThreads(long forumId,\n+\t\t\tDiscussionOrder order, Integer limit, Integer offset, long userId) {\n+\t\tif (limit != null && offset != null ) {","path":"lib/jdomodels/src/main/java/org/sagebionetworks/repo/model/dbo/dao/discussion/DBODiscussionThreadDAOImpl.java","position":199,"original_position":199,"commit_id":"56928dee7b9974d63f6972de092d25756311573e","original_commit_id":"56928dee7b9974d63f6972de092d25756311573e","user":{"login":"john-hill","id":1728181,"avatar_url":"https://avatars.githubusercontent.com/u/1728181?v=3","gravatar_id":"","url":"https://api.github.com/users/john-hill","html_url":"https://github.com/john-hill","followers_url":"https://api.github.com/users/john-hill/followers","following_url":"https://api.github.com/users/john-hill/following{/other_user}","gists_url":"https://api.github.com/users/john-hill/gists{/gist_id}","starred_url":"https://api.github.com/users/john-hill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john-hill/subscriptions","organizations_url":"https://api.github.com/users/john-hill/orgs","repos_url":"https://api.github.com/users/john-hill/repos","events_url":"https://api.github.com/users/john-hill/events{/privacy}","received_events_url":"https://api.github.com/users/john-hill/received_events","type":"User","site_admin":false},"body":"need check for null limit and offset.","created_at":"2015-11-19T03:09:32Z","updated_at":"2015-11-19T03:09:32Z","html_url":"https://github.com/Sage-Bionetworks/Synapse-Repository-Services/pull/2191#discussion_r45295034","pull_request_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/pulls/2191","_links":{"self":{"href":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/pulls/comments/45295034"},"html":{"href":"https://github.com/Sage-Bionetworks/Synapse-Repository-Services/pull/2191#discussion_r45295034"},"pull_request":{"href":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/pulls/2191"}}},"pull_request":{"url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/pulls/2191","id":50563709,"html_url":"https://github.com/Sage-Bionetworks/Synapse-Repository-Services/pull/2191","diff_url":"https://github.com/Sage-Bionetworks/Synapse-Repository-Services/pull/2191.diff","patch_url":"https://github.com/Sage-Bionetworks/Synapse-Repository-Services/pull/2191.patch","issue_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/issues/2191","number":2191,"state":"open","locked":false,"title":"ThreadDAO","user":{"login":"kimyen","id":4404426,"avatar_url":"https://avatars.githubusercontent.com/u/4404426?v=3","gravatar_id":"","url":"https://api.github.com/users/kimyen","html_url":"https://github.com/kimyen","followers_url":"https://api.github.com/users/kimyen/followers","following_url":"https://api.github.com/users/kimyen/following{/other_user}","gists_url":"https://api.github.com/users/kimyen/gists{/gist_id}","starred_url":"https://api.github.com/users/kimyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kimyen/subscriptions","organizations_url":"https://api.github.com/users/kimyen/orgs","repos_url":"https://api.github.com/users/kimyen/repos","events_url":"https://api.github.com/users/kimyen/events{/privacy}","received_events_url":"https://api.github.com/users/kimyen/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-12T20:33:14Z","updated_at":"2015-11-19T03:09:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0bd6b2e015d24de9fd83dbd57f198d5492d867c2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/pulls/2191/commits","review_comments_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/pulls/2191/comments","review_comment_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/issues/2191/comments","statuses_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/statuses/56928dee7b9974d63f6972de092d25756311573e","head":{"label":"kimyen:forum","ref":"forum","sha":"56928dee7b9974d63f6972de092d25756311573e","user":{"login":"kimyen","id":4404426,"avatar_url":"https://avatars.githubusercontent.com/u/4404426?v=3","gravatar_id":"","url":"https://api.github.com/users/kimyen","html_url":"https://github.com/kimyen","followers_url":"https://api.github.com/users/kimyen/followers","following_url":"https://api.github.com/users/kimyen/following{/other_user}","gists_url":"https://api.github.com/users/kimyen/gists{/gist_id}","starred_url":"https://api.github.com/users/kimyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kimyen/subscriptions","organizations_url":"https://api.github.com/users/kimyen/orgs","repos_url":"https://api.github.com/users/kimyen/repos","events_url":"https://api.github.com/users/kimyen/events{/privacy}","received_events_url":"https://api.github.com/users/kimyen/received_events","type":"User","site_admin":false},"repo":{"id":21015715,"name":"Synapse-Repository-Services","full_name":"kimyen/Synapse-Repository-Services","owner":{"login":"kimyen","id":4404426,"avatar_url":"https://avatars.githubusercontent.com/u/4404426?v=3","gravatar_id":"","url":"https://api.github.com/users/kimyen","html_url":"https://github.com/kimyen","followers_url":"https://api.github.com/users/kimyen/followers","following_url":"https://api.github.com/users/kimyen/following{/other_user}","gists_url":"https://api.github.com/users/kimyen/gists{/gist_id}","starred_url":"https://api.github.com/users/kimyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kimyen/subscriptions","organizations_url":"https://api.github.com/users/kimyen/orgs","repos_url":"https://api.github.com/users/kimyen/repos","events_url":"https://api.github.com/users/kimyen/events{/privacy}","received_events_url":"https://api.github.com/users/kimyen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kimyen/Synapse-Repository-Services","description":"The Synapse Repository Services project is the home of the JSON REST web services for Synapse.","fork":true,"url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services","forks_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/forks","keys_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/teams","hooks_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/hooks","issue_events_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/issues/events{/number}","events_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/events","assignees_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/assignees{/user}","branches_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/branches{/branch}","tags_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/tags","blobs_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/git/refs{/sha}","trees_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/statuses/{sha}","languages_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/languages","stargazers_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/stargazers","contributors_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/contributors","subscribers_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/subscribers","subscription_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/subscription","commits_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/commits{/sha}","git_commits_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/git/commits{/sha}","comments_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/comments{/number}","issue_comment_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/issues/comments{/number}","contents_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/contents/{+path}","compare_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/merges","archive_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/downloads","issues_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/issues{/number}","pulls_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/pulls{/number}","milestones_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/milestones{/number}","notifications_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/labels{/name}","releases_url":"https://api.github.com/repos/kimyen/Synapse-Repository-Services/releases{/id}","created_at":"2014-06-19T21:10:37Z","updated_at":"2015-02-04T05:02:04Z","pushed_at":"2015-11-19T01:44:33Z","git_url":"git://github.com/kimyen/Synapse-Repository-Services.git","ssh_url":"git@github.com:kimyen/Synapse-Repository-Services.git","clone_url":"https://github.com/kimyen/Synapse-Repository-Services.git","svn_url":"https://github.com/kimyen/Synapse-Repository-Services","homepage":null,"size":53613,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"develop"}},"base":{"label":"Sage-Bionetworks:develop","ref":"develop","sha":"f64d2d5cd571c5c1caf650ecc993ab4fc59d8001","user":{"login":"Sage-Bionetworks","id":1250897,"avatar_url":"https://avatars.githubusercontent.com/u/1250897?v=3","gravatar_id":"","url":"https://api.github.com/users/Sage-Bionetworks","html_url":"https://github.com/Sage-Bionetworks","followers_url":"https://api.github.com/users/Sage-Bionetworks/followers","following_url":"https://api.github.com/users/Sage-Bionetworks/following{/other_user}","gists_url":"https://api.github.com/users/Sage-Bionetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/Sage-Bionetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sage-Bionetworks/subscriptions","organizations_url":"https://api.github.com/users/Sage-Bionetworks/orgs","repos_url":"https://api.github.com/users/Sage-Bionetworks/repos","events_url":"https://api.github.com/users/Sage-Bionetworks/events{/privacy}","received_events_url":"https://api.github.com/users/Sage-Bionetworks/received_events","type":"Organization","site_admin":false},"repo":{"id":4400676,"name":"Synapse-Repository-Services","full_name":"Sage-Bionetworks/Synapse-Repository-Services","owner":{"login":"Sage-Bionetworks","id":1250897,"avatar_url":"https://avatars.githubusercontent.com/u/1250897?v=3","gravatar_id":"","url":"https://api.github.com/users/Sage-Bionetworks","html_url":"https://github.com/Sage-Bionetworks","followers_url":"https://api.github.com/users/Sage-Bionetworks/followers","following_url":"https://api.github.com/users/Sage-Bionetworks/following{/other_user}","gists_url":"https://api.github.com/users/Sage-Bionetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/Sage-Bionetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sage-Bionetworks/subscriptions","organizations_url":"https://api.github.com/users/Sage-Bionetworks/orgs","repos_url":"https://api.github.com/users/Sage-Bionetworks/repos","events_url":"https://api.github.com/users/Sage-Bionetworks/events{/privacy}","received_events_url":"https://api.github.com/users/Sage-Bionetworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Sage-Bionetworks/Synapse-Repository-Services","description":"The Synapse Repository Services project is the home of the JSON REST web services for Synapse.","fork":false,"url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services","forks_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/forks","keys_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/teams","hooks_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/hooks","issue_events_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/issues/events{/number}","events_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/events","assignees_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/assignees{/user}","branches_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/branches{/branch}","tags_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/tags","blobs_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/statuses/{sha}","languages_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/languages","stargazers_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/stargazers","contributors_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/contributors","subscribers_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/subscribers","subscription_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/subscription","commits_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/contents/{+path}","compare_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/merges","archive_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/downloads","issues_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/issues{/number}","pulls_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/pulls{/number}","milestones_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/milestones{/number}","notifications_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/labels{/name}","releases_url":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/releases{/id}","created_at":"2012-05-22T01:06:50Z","updated_at":"2015-11-10T18:51:43Z","pushed_at":"2015-11-18T23:11:34Z","git_url":"git://github.com/Sage-Bionetworks/Synapse-Repository-Services.git","ssh_url":"git@github.com:Sage-Bionetworks/Synapse-Repository-Services.git","clone_url":"https://github.com/Sage-Bionetworks/Synapse-Repository-Services.git","svn_url":"https://github.com/Sage-Bionetworks/Synapse-Repository-Services","homepage":null,"size":63103,"stargazers_count":18,"watchers_count":18,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":13,"forks":24,"open_issues":13,"watchers":18,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/pulls/2191"},"html":{"href":"https://github.com/Sage-Bionetworks/Synapse-Repository-Services/pull/2191"},"issue":{"href":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/issues/2191"},"comments":{"href":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/issues/2191/comments"},"review_comments":{"href":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/pulls/2191/comments"},"review_comment":{"href":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/pulls/2191/commits"},"statuses":{"href":"https://api.github.com/repos/Sage-Bionetworks/Synapse-Repository-Services/statuses/56928dee7b9974d63f6972de092d25756311573e"}}}}