{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/product-pc/pulls/comments/77575830","id":77575830,"diff_hunk":"@@ -0,0 +1,324 @@\n+/*\n+ * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package org.wso2.carbon.pc.core.transfer;\n+\n+import org.apache.commons.codec.binary.Base64;\n+import org.apache.commons.io.FileUtils;\n+import org.apache.commons.io.IOUtils;\n+import org.apache.commons.logging.Log;\n+import org.apache.commons.logging.LogFactory;\n+import org.json.JSONArray;\n+import org.json.JSONException;\n+import org.json.JSONObject;\n+import org.wso2.carbon.pc.core.FolderZiper;\n+import org.wso2.carbon.pc.core.ProcessCenterConstants;\n+import org.wso2.carbon.pc.core.ProcessCenterException;\n+import org.wso2.carbon.pc.core.ProcessStore;\n+import org.wso2.carbon.pc.core.internal.ProcessCenterServerHolder;\n+import org.wso2.carbon.registry.core.Resource;\n+import org.wso2.carbon.registry.core.exceptions.RegistryException;\n+import org.wso2.carbon.registry.core.service.RegistryService;\n+import org.wso2.carbon.registry.core.session.UserRegistry;\n+import org.xml.sax.SAXException;\n+\n+import javax.xml.parsers.ParserConfigurationException;\n+import javax.xml.transform.TransformerException;\n+import java.io.*;\n+import java.nio.charset.StandardCharsets;\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+public class ProcessExport {\n+    private List<String> exportedProcessList;\n+    private static final Log log = LogFactory.getLog(ProcessExport.class);\n+\n+    /**\n+     * @param processName\n+     * @param processVersion\n+     * @param exportWithAssociations\n+     * @param user\n+     * @return\n+     * @throws Exception\n+     */\n+    public String initiateExportProcess(String processName, String processVersion, String exportWithAssociations,\n+            String user) throws Exception {\n+        exportedProcessList = new ArrayList<String>();\n+        File exportsDir = new File(ProcessCenterConstants.PROCESS_EXPORT_DIR);\n+        if (exportsDir != null) {\n+            exportsDir.mkdirs();\n+            Boolean exportWithAssociationsBool = Boolean.valueOf(exportWithAssociations);\n+            try {\n+                // save details about the exported zip and the core process\n+                String exportRootPath =\n+                        ProcessCenterConstants.PROCESS_EXPORT_DIR + \"/\" + processName + \"-\" + processVersion +\n+                                ProcessCenterConstants.EXPORTS_DIR_SUFFIX + \"/\";\n+                new File(exportRootPath).mkdirs();\n+                exportProcess(exportRootPath, processName, processVersion, exportWithAssociationsBool, user);\n+\n+                //zip the folder\n+                FolderZiper folderZiper = new FolderZiper();\n+                String zipFilePath = ProcessCenterConstants.PROCESS_EXPORT_DIR + \"/\" + processName + \"-\" +\n+                        processVersion + ProcessCenterConstants.EXPORTS_ZIP_SUFFIX;\n+                folderZiper.zipFolder(exportRootPath, zipFilePath);\n+                //encode zip file\n+                String encodedZip = encodeFileToBase64Binary(zipFilePath);\n+                //Finally remove the Imports folder and the zip file\n+                FileUtils.deleteDirectory(exportsDir);\n+                FileUtils.deleteDirectory(new File(zipFilePath));\n+                return encodedZip;\n+\n+            } catch (Exception e) {\n+                String errMsg = \"Failed to export process:\" + processName + \"-\" + processVersion;\n+                log.error(errMsg, e);\n+                throw new ProcessCenterException(errMsg, e);\n+            }\n+        } else {\n+            String errMsg = \"Exports Directory Creation failed..!!! So failed to export process:\" + processName + \"-\" +\n+                    processVersion;\n+            throw new ProcessCenterException(errMsg);\n+        }\n+    }\n+\n+    /**\n+     * Save all the process related artifacts in exportRootPath directory\n+     *\n+     * @param exportRootPath\n+     * @param processName\n+     * @param processVersion\n+     * @param exportWithAssociations\n+     * @param user\n+     * @throws ProcessCenterException\n+     */\n+    public void exportProcess(String exportRootPath, String processName, String processVersion,\n+            boolean exportWithAssociations, String user) throws ProcessCenterException {\n+\n+        if (exportedProcessList.contains(processName + \"-\" + processVersion)) {\n+            return;\n+        }\n+        exportedProcessList.add(processName + \"-\" + processVersion);\n+\n+        try {\n+\n+            RegistryService registryService = ProcessCenterServerHolder.getInstance().getRegistryService();\n+            if (registryService != null) {\n+                UserRegistry reg = registryService.getGovernanceUserRegistry(user);\n+                ProcessStore ps = new ProcessStore();\n+                String exportProcessPath = exportRootPath + processName + \"-\" + processVersion + \"/\";\n+                new File(exportProcessPath + ProcessCenterConstants.PROCESS_ZIP_DOCUMENTS_DIR + \"/\").mkdirs();\n+\n+                //save the process rxt registry entry >> xml\n+                downloadResource(reg, ProcessCenterConstants.PROCESS_ASSET_ROOT,\n+                        ProcessCenterConstants.EXPORTED_PROCESS_RXT_FILE, processName, processVersion, \"xml\",\n+                        exportProcessPath);\n+                //save bpmn registry entry >> xml\n+                downloadResource(reg, ProcessCenterConstants.BPMN_META_DATA_FILE_PATH,\n+                        ProcessCenterConstants.EXPORTED_BPMN_META_FILE, processName, processVersion, \"xml\",\n+                        exportProcessPath);\n+                //save bpmncontent registry entry >> xml\n+                downloadResource(reg, ProcessCenterConstants.BPMN_CONTENT_PATH,\n+                        ProcessCenterConstants.EXPORTED_BPMN_CONTENT_FILE, processName, processVersion, \"xml\",\n+                        exportProcessPath);\n+                //save flowchart registry entry >> json\n+                downloadResource(reg, ProcessCenterConstants.AUDIT.PROCESS_FLOW_CHART_PATH,\n+                        ProcessCenterConstants.EXPORTED_FLOW_CHART_FILE, processName, processVersion, \"json\",\n+                        exportProcessPath);\n+                //save processText registry entry\n+                downloadResource(reg, ProcessCenterConstants.PROCESS_TEXT_PATH,\n+                        ProcessCenterConstants.EXPORTED_PROCESS_TEXT_FILE, processName, processVersion, \"txt\",\n+                        exportProcessPath);\n+\n+                //save doccontent registry entries >> doc, docx, pdf\n+                String processResourcePath = ProcessCenterConstants.PROCESS_ASSET_ROOT + processName + \"/\" +\n+                        processVersion;\n+                JSONArray jsonArray = new JSONArray(\n+                        ps.getUploadedDocumentDetails(ProcessCenterConstants.GREG_PATH + processResourcePath));\n+                for (int i = 0; i < jsonArray.length(); i++) {\n+                    JSONObject jsonObj = jsonArray.getJSONObject(i);\n+                    if (jsonObj.getString(\"url\").equals(\"NA\")) {\n+                        String docResourcePath = jsonObj.getString(\"path\");\n+                        Resource docResource = reg.get(docResourcePath);\n+                        String[] tempStrArr = docResourcePath.split(\"/\");\n+                        String docFileName =\n+                                exportProcessPath + ProcessCenterConstants.PROCESS_ZIP_DOCUMENTS_DIR + \"/\" +\n+                                        tempStrArr[tempStrArr.length - 1];\n+                        FileOutputStream docFileOutPutStream = new FileOutputStream(docFileName);\n+                        IOUtils.copy(docResource.getContentStream(), docFileOutPutStream);\n+                        docFileOutPutStream.close();\n+                    }\n+                }\n+\n+                //download process image thumbnail\n+                downloadProcessThumbnailImage(reg, processName, processVersion, exportProcessPath);\n+\n+                //write process tags in a file\n+                FileOutputStream tagsFileOutputStream = new FileOutputStream(\n+                        exportProcessPath + ProcessCenterConstants.PROCESS_TAGS_FILE);\n+                tagsFileOutputStream.write(ps.getProcessTags(processName, processVersion).getBytes());\n+                tagsFileOutputStream.close();\n+\n+                //export process associations\n+                if (exportWithAssociations) {\n+                    //write details on process associations (sub-processes/predecessors/successors) in a json file\n+                    FileOutputStream out = new FileOutputStream(\n+                            exportProcessPath + ProcessCenterConstants.PROCESS_ASSOCIATIONS_FILE);\n+                    JSONObject successorPredecessorSubprocessListJSON = new JSONObject(\n+                            ps.getSucessorPredecessorSubprocessList(\n+                                    ProcessCenterConstants.GREG_PATH + processResourcePath));\n+                    out.write(successorPredecessorSubprocessListJSON\n+                            .toString(ProcessCenterConstants.JSON_FILE_INDENT_FACTOR).getBytes());\n+                    out.close();\n+\n+                    exportAssociatedProcesses(successorPredecessorSubprocessListJSON, exportRootPath,\n+                            exportWithAssociations, ProcessCenterConstants.SUBPROCESSES, user);\n+                    exportAssociatedProcesses(successorPredecessorSubprocessListJSON, exportRootPath,\n+                            exportWithAssociations, ProcessCenterConstants.PREDECESSORS, user);\n+                    exportAssociatedProcesses(successorPredecessorSubprocessListJSON, exportRootPath,\n+                            exportWithAssociations, ProcessCenterConstants.SUCCESSORS, user);\n+                }\n+            }\n+        } catch (Exception e) {\n+            String errMsg = \"Failed to export process:\" + processName + \"-\" + processVersion;\n+            log.error(errMsg, e);\n+            throw new ProcessCenterException(errMsg, e);\n+        }\n+    }\n+\n+    /**\n+     * Export associated process (sub process/predecessor/successor) - The related files are saved in the respective\n+     * directory\n+     *\n+     * @param successorPredecessorSubprocessListJSON\n+     * @param exportRootPath\n+     * @param exportWithAssociations\n+     * @param assocationType\n+     * @param user\n+     * @throws JSONException\n+     * @throws ProcessCenterException\n+     */\n+    public void exportAssociatedProcesses(JSONObject successorPredecessorSubprocessListJSON, String exportRootPath,\n+            boolean exportWithAssociations, String assocationType, String user)\n+            throws JSONException, ProcessCenterException {\n+        JSONArray associatedProcessesJArray = successorPredecessorSubprocessListJSON.getJSONArray(assocationType);\n+\n+        for (int i = 0; i < associatedProcessesJArray.length(); i++) {\n+            String processName = associatedProcessesJArray.getJSONObject(i).getString(\"name\");\n+            String processVersion = associatedProcessesJArray.getJSONObject(i).getString(\"version\");\n+            exportProcess(exportRootPath, processName, processVersion, exportWithAssociations, user);\n+        }\n+    }\n+\n+    /**\n+     * Download non-document process related resources (i.e: flow chart, bpmn, process text) for exporting the process\n+     *\n+     * @param reg\n+     * @param resourceRoot\n+     * @param savingFileName\n+     * @param processName\n+     * @param processVersion\n+     * @param exportedFileType\n+     * @param exportProcessPath\n+     * @throws RegistryException\n+     * @throws IOException\n+     * @throws JSONException\n+     * @throws ParserConfigurationException\n+     * @throws SAXException\n+     * @throws TransformerException\n+     */\n+    public void downloadResource(UserRegistry reg, String resourceRoot, String savingFileName, String processName,\n+            String processVersion, String exportedFileType, String exportProcessPath)\n+            throws RegistryException, IOException, JSONException, ParserConfigurationException, SAXException,\n+            TransformerException {\n+        String resourcePath = resourceRoot + processName + \"/\" + processVersion;\n+        if (reg.resourceExists(resourcePath)) {\n+            Resource resource = reg.get(resourcePath);\n+            FileOutputStream fileOutputStream = new FileOutputStream(exportProcessPath + savingFileName);\n+            if (exportedFileType.equals(\"json\")) {\n+                String stringContent = IOUtils\n+                        .toString(resource.getContentStream(), String.valueOf(StandardCharsets.UTF_8));\n+                //create JSONObject to pretty-print content\n+                JSONObject contentInJSON = new JSONObject(stringContent);\n+                fileOutputStream\n+                        .write(contentInJSON.toString(ProcessCenterConstants.JSON_FILE_INDENT_FACTOR).getBytes());\n+                fileOutputStream.close();\n+            } else if (exportedFileType.equals(\"xml\")) {\n+                IOUtils.copy(resource.getContentStream(), fileOutputStream);\n+            } else { //.pdf, doc, docx, txt\n+                IOUtils.copy(resource.getContentStream(), fileOutputStream);\n+            }\n+        }\n+    }\n+\n+    public String encodeFileToBase64Binary(String fileName) throws IOException {\n+        File file = new File(fileName);\n+        byte[] bytes = loadFile(file);\n+        byte[] encoded = Base64.encodeBase64(bytes);\n+        String encodedString = new String(encoded);\n+\n+        return encodedString;\n+    }\n+\n+    public static byte[] loadFile(File file) throws IOException {\n+        InputStream is = new FileInputStream(file);\n+\n+        long length = file.length();\n+        if (length > Integer.MAX_VALUE) {\n+            // File is too large","path":"modules/components/core/org.wso2.carbon.pc.core/src/main/java/org/wso2/carbon/pc/core/transfer/ProcessExport.java","position":279,"original_position":279,"commit_id":"58122da92c5b9ad9f6cf2f4e0266136fa7919e29","original_commit_id":"58122da92c5b9ad9f6cf2f4e0266136fa7919e29","user":{"login":"malinthaadikari","id":7113404,"avatar_url":"https://avatars.githubusercontent.com/u/7113404?v=3","gravatar_id":"","url":"https://api.github.com/users/malinthaadikari","html_url":"https://github.com/malinthaadikari","followers_url":"https://api.github.com/users/malinthaadikari/followers","following_url":"https://api.github.com/users/malinthaadikari/following{/other_user}","gists_url":"https://api.github.com/users/malinthaadikari/gists{/gist_id}","starred_url":"https://api.github.com/users/malinthaadikari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malinthaadikari/subscriptions","organizations_url":"https://api.github.com/users/malinthaadikari/orgs","repos_url":"https://api.github.com/users/malinthaadikari/repos","events_url":"https://api.github.com/users/malinthaadikari/events{/privacy}","received_events_url":"https://api.github.com/users/malinthaadikari/received_events","type":"User","site_admin":false},"body":"Doing nothing in the if block. We can remove this empty block.","created_at":"2016-09-06T05:42:30Z","updated_at":"2016-09-06T05:42:30Z","html_url":"https://github.com/wso2/product-pc/pull/139#discussion_r77575830","pull_request_url":"https://api.github.com/repos/wso2/product-pc/pulls/139","_links":{"self":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/comments/77575830"},"html":{"href":"https://github.com/wso2/product-pc/pull/139#discussion_r77575830"},"pull_request":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/139"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/product-pc/pulls/139","id":80494884,"html_url":"https://github.com/wso2/product-pc/pull/139","diff_url":"https://github.com/wso2/product-pc/pull/139.diff","patch_url":"https://github.com/wso2/product-pc/pull/139.patch","issue_url":"https://api.github.com/repos/wso2/product-pc/issues/139","number":139,"state":"closed","locked":false,"title":"Process Import & Export","user":{"login":"rmsamitha","id":2484781,"avatar_url":"https://avatars.githubusercontent.com/u/2484781?v=3","gravatar_id":"","url":"https://api.github.com/users/rmsamitha","html_url":"https://github.com/rmsamitha","followers_url":"https://api.github.com/users/rmsamitha/followers","following_url":"https://api.github.com/users/rmsamitha/following{/other_user}","gists_url":"https://api.github.com/users/rmsamitha/gists{/gist_id}","starred_url":"https://api.github.com/users/rmsamitha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmsamitha/subscriptions","organizations_url":"https://api.github.com/users/rmsamitha/orgs","repos_url":"https://api.github.com/users/rmsamitha/repos","events_url":"https://api.github.com/users/rmsamitha/events{/privacy}","received_events_url":"https://api.github.com/users/rmsamitha/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-08T18:04:35Z","updated_at":"2016-09-06T05:42:30Z","closed_at":"2016-08-08T18:39:14Z","merged_at":"2016-08-08T18:39:14Z","merge_commit_sha":"7fb070d9acb95c95a308166bc05480ddc88a0252","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/wso2/product-pc/pulls/139/commits","review_comments_url":"https://api.github.com/repos/wso2/product-pc/pulls/139/comments","review_comment_url":"https://api.github.com/repos/wso2/product-pc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/product-pc/issues/139/comments","statuses_url":"https://api.github.com/repos/wso2/product-pc/statuses/58122da92c5b9ad9f6cf2f4e0266136fa7919e29","head":{"label":"rmsamitha:master","ref":"master","sha":"58122da92c5b9ad9f6cf2f4e0266136fa7919e29","user":{"login":"rmsamitha","id":2484781,"avatar_url":"https://avatars.githubusercontent.com/u/2484781?v=3","gravatar_id":"","url":"https://api.github.com/users/rmsamitha","html_url":"https://github.com/rmsamitha","followers_url":"https://api.github.com/users/rmsamitha/followers","following_url":"https://api.github.com/users/rmsamitha/following{/other_user}","gists_url":"https://api.github.com/users/rmsamitha/gists{/gist_id}","starred_url":"https://api.github.com/users/rmsamitha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmsamitha/subscriptions","organizations_url":"https://api.github.com/users/rmsamitha/orgs","repos_url":"https://api.github.com/users/rmsamitha/repos","events_url":"https://api.github.com/users/rmsamitha/events{/privacy}","received_events_url":"https://api.github.com/users/rmsamitha/received_events","type":"User","site_admin":false},"repo":{"id":52355346,"name":"product-pc","full_name":"rmsamitha/product-pc","owner":{"login":"rmsamitha","id":2484781,"avatar_url":"https://avatars.githubusercontent.com/u/2484781?v=3","gravatar_id":"","url":"https://api.github.com/users/rmsamitha","html_url":"https://github.com/rmsamitha","followers_url":"https://api.github.com/users/rmsamitha/followers","following_url":"https://api.github.com/users/rmsamitha/following{/other_user}","gists_url":"https://api.github.com/users/rmsamitha/gists{/gist_id}","starred_url":"https://api.github.com/users/rmsamitha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmsamitha/subscriptions","organizations_url":"https://api.github.com/users/rmsamitha/orgs","repos_url":"https://api.github.com/users/rmsamitha/repos","events_url":"https://api.github.com/users/rmsamitha/events{/privacy}","received_events_url":"https://api.github.com/users/rmsamitha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rmsamitha/product-pc","description":"","fork":true,"url":"https://api.github.com/repos/rmsamitha/product-pc","forks_url":"https://api.github.com/repos/rmsamitha/product-pc/forks","keys_url":"https://api.github.com/repos/rmsamitha/product-pc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rmsamitha/product-pc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rmsamitha/product-pc/teams","hooks_url":"https://api.github.com/repos/rmsamitha/product-pc/hooks","issue_events_url":"https://api.github.com/repos/rmsamitha/product-pc/issues/events{/number}","events_url":"https://api.github.com/repos/rmsamitha/product-pc/events","assignees_url":"https://api.github.com/repos/rmsamitha/product-pc/assignees{/user}","branches_url":"https://api.github.com/repos/rmsamitha/product-pc/branches{/branch}","tags_url":"https://api.github.com/repos/rmsamitha/product-pc/tags","blobs_url":"https://api.github.com/repos/rmsamitha/product-pc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rmsamitha/product-pc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rmsamitha/product-pc/git/refs{/sha}","trees_url":"https://api.github.com/repos/rmsamitha/product-pc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rmsamitha/product-pc/statuses/{sha}","languages_url":"https://api.github.com/repos/rmsamitha/product-pc/languages","stargazers_url":"https://api.github.com/repos/rmsamitha/product-pc/stargazers","contributors_url":"https://api.github.com/repos/rmsamitha/product-pc/contributors","subscribers_url":"https://api.github.com/repos/rmsamitha/product-pc/subscribers","subscription_url":"https://api.github.com/repos/rmsamitha/product-pc/subscription","commits_url":"https://api.github.com/repos/rmsamitha/product-pc/commits{/sha}","git_commits_url":"https://api.github.com/repos/rmsamitha/product-pc/git/commits{/sha}","comments_url":"https://api.github.com/repos/rmsamitha/product-pc/comments{/number}","issue_comment_url":"https://api.github.com/repos/rmsamitha/product-pc/issues/comments{/number}","contents_url":"https://api.github.com/repos/rmsamitha/product-pc/contents/{+path}","compare_url":"https://api.github.com/repos/rmsamitha/product-pc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rmsamitha/product-pc/merges","archive_url":"https://api.github.com/repos/rmsamitha/product-pc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rmsamitha/product-pc/downloads","issues_url":"https://api.github.com/repos/rmsamitha/product-pc/issues{/number}","pulls_url":"https://api.github.com/repos/rmsamitha/product-pc/pulls{/number}","milestones_url":"https://api.github.com/repos/rmsamitha/product-pc/milestones{/number}","notifications_url":"https://api.github.com/repos/rmsamitha/product-pc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rmsamitha/product-pc/labels{/name}","releases_url":"https://api.github.com/repos/rmsamitha/product-pc/releases{/id}","deployments_url":"https://api.github.com/repos/rmsamitha/product-pc/deployments","created_at":"2016-02-23T11:54:05Z","updated_at":"2016-02-23T11:54:08Z","pushed_at":"2016-08-11T07:53:56Z","git_url":"git://github.com/rmsamitha/product-pc.git","ssh_url":"git@github.com:rmsamitha/product-pc.git","clone_url":"https://github.com/rmsamitha/product-pc.git","svn_url":"https://github.com/rmsamitha/product-pc","homepage":null,"size":20225,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"wso2:master","ref":"master","sha":"bd44ff038fddb50251c1679e6c1e9ddc60b86aae","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":25909621,"name":"product-pc","full_name":"wso2/product-pc","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/product-pc","description":"Welcome to the WSO2 Process Center source code! For info on working with the WSO2 Process Center repository and contributing code, click the link below.","fork":false,"url":"https://api.github.com/repos/wso2/product-pc","forks_url":"https://api.github.com/repos/wso2/product-pc/forks","keys_url":"https://api.github.com/repos/wso2/product-pc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/product-pc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/product-pc/teams","hooks_url":"https://api.github.com/repos/wso2/product-pc/hooks","issue_events_url":"https://api.github.com/repos/wso2/product-pc/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/product-pc/events","assignees_url":"https://api.github.com/repos/wso2/product-pc/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/product-pc/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/product-pc/tags","blobs_url":"https://api.github.com/repos/wso2/product-pc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/product-pc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/product-pc/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/product-pc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/product-pc/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/product-pc/languages","stargazers_url":"https://api.github.com/repos/wso2/product-pc/stargazers","contributors_url":"https://api.github.com/repos/wso2/product-pc/contributors","subscribers_url":"https://api.github.com/repos/wso2/product-pc/subscribers","subscription_url":"https://api.github.com/repos/wso2/product-pc/subscription","commits_url":"https://api.github.com/repos/wso2/product-pc/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/product-pc/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/product-pc/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/product-pc/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/product-pc/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/product-pc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/product-pc/merges","archive_url":"https://api.github.com/repos/wso2/product-pc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/product-pc/downloads","issues_url":"https://api.github.com/repos/wso2/product-pc/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/product-pc/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/product-pc/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/product-pc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/product-pc/labels{/name}","releases_url":"https://api.github.com/repos/wso2/product-pc/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/product-pc/deployments","created_at":"2014-10-29T07:33:38Z","updated_at":"2016-08-02T08:28:42Z","pushed_at":"2016-09-05T04:50:27Z","git_url":"git://github.com/wso2/product-pc.git","ssh_url":"git@github.com:wso2/product-pc.git","clone_url":"https://github.com/wso2/product-pc.git","svn_url":"https://github.com/wso2/product-pc","homepage":"http://wso2.github.io/","size":21664,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":2,"forks":19,"open_issues":2,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/139"},"html":{"href":"https://github.com/wso2/product-pc/pull/139"},"issue":{"href":"https://api.github.com/repos/wso2/product-pc/issues/139"},"comments":{"href":"https://api.github.com/repos/wso2/product-pc/issues/139/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/139/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/139/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/product-pc/statuses/58122da92c5b9ad9f6cf2f4e0266136fa7919e29"}}}}
{"actor":{"display_login":"malinthaadikari"}}