{"action":"created","comment":{"url":"https://api.github.com/repos/usharesoft/appcenter-docs/pulls/comments/189288133","pull_request_review_id":121443484,"id":189288133,"diff_hunk":"@@ -0,0 +1,90 @@\n+#!/bin/bash\n+\n+# Checking if the running process is \"/bin/sh\"\n+# If it's \"/bin/sh\" then the user is executing the file directly\n+# We want the user to source the file instead (source ./venv.sh or . ./venv.sh)\n+if ps -p $$ --no-headers -o cmd | grep -q \"^/bin/bash \"; then\n+    echo \"Please source the command instead of executing it:\"\n+    echo \"  source $0\"\n+    exit 1\n+fi\n+\n+BASEDIR=$(dirname $(readlink -f \"$0\"))\n+if [ -d \"$BASEDIR/.venv\" ]; then\n+    echo \"Existing virtual environment found.\"\n+    source $BASEDIR/.venv/bin/activate\n+else\n+    echo \"===================================================================\"\n+    echo \"Installing new virtual environment, this will take a few minutes...\"\n+    echo \"===================================================================\"\n+    virtualenv $BASEDIR/.venv && source $BASEDIR/.venv/bin/activate && pip install -r $BASEDIR/requirements.txt\n+fi\n+\n+function validate-param() {\n+    case \"$1\" in\n+        \"apis\" | \"admin\" | \"end-user\")\n+            return 0\n+            ;;\n+        *)\n+            echo 'Required parameter: \"end-user\", \"admin\", or \"apis\"'\n+            return 1\n+            ;;\n+    esac\n+}\n+\n+function make-doc() { validate-param $1 && pushd $BASEDIR/$1/en && make clean html && popd }\n+\n+function serve-doc() {\n+    validate-param $1 && echo \"ctrl-C to stop the server \" && pushd $BASEDIR/$1/en/build/html &&\n+        python -m SimpleHTTPServer || popd\n+}\n+\n+function copy-uforge-api() {\n+    UFORGE_DIR=$(realpath \"$BASEDIR/../uforge\")\n+    if [[ ! -z \"$1\" ]]; then\n+       UFORGE_DIR=$1\n+    fi\n+\n+    echo \"Please make sure that uforge wadl has been generated (mvn clean install -PnoLib,noGWT,wadl) before copying.\"\n+    echo \"Copy uforge API files from $UFORGE_DIR? [y/n]\"\n+    read\n+    echo\n+\n+    if [[ $REPLY =~ ^[Yy]$ ]]; then\n+        echo \"Copying generated API files into apis/en/source/ ...\"\n+        cp -v $UFORGE_DIR/UForgeAPI/target/xslt/dto/*.rst $BASEDIR/apis/en/source/pages/dto-objects\n+        # careful with the space in \"uForge API\" directory, need the double quote\n+        cp -v \"$(find $UFORGE_DIR/uForgeRest/target/xslt/ -name index.rst)\" $BASEDIR/apis/en/source/\n+        cp -v $UFORGE_DIR/uForgeRest/target/wadl/application.wadl $BASEDIR/apis/en/source/pages\n+        cp -v $UFORGE_DIR/uForgeRest/target/wadl/uforge.xsd $BASEDIR/apis/en/source/pages/dto-objects\n+\n+        echo \"Fixing the generated index.rst to add the missing label for end-user doc if needed...\"\n+        # the silent grep makes sure we don't do it if the label already exists\n+        grep -q '_apis-index:' $BASEDIR/apis/en/source/index.rst || sed -i '1 a \\\\n.. _apis-index:' $BASEDIR/apis/en/source/index.rst\n+\n+    else\n+        echo \"Copy aborted.\"\n+    fi\n+\n+}\n+\n+echo\n+echo \"\\e[1mumake-doc\\e[0m can be used to generate the doc html:\"","path":"venv.sh","position":72,"original_position":72,"commit_id":"5d4027981a7be432d8222903b1e7fe15e587e91d","original_commit_id":"5d4027981a7be432d8222903b1e7fe15e587e91d","user":{"login":"thachmai","id":1647008,"avatar_url":"https://avatars0.githubusercontent.com/u/1647008?v=4","gravatar_id":"","url":"https://api.github.com/users/thachmai","html_url":"https://github.com/thachmai","followers_url":"https://api.github.com/users/thachmai/followers","following_url":"https://api.github.com/users/thachmai/following{/other_user}","gists_url":"https://api.github.com/users/thachmai/gists{/gist_id}","starred_url":"https://api.github.com/users/thachmai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thachmai/subscriptions","organizations_url":"https://api.github.com/users/thachmai/orgs","repos_url":"https://api.github.com/users/thachmai/repos","events_url":"https://api.github.com/users/thachmai/events{/privacy}","received_events_url":"https://api.github.com/users/thachmai/received_events","type":"User","site_admin":false},"body":"to be fixed in next commit","created_at":"2018-05-18T14:31:49Z","updated_at":"2018-05-18T14:31:49Z","html_url":"https://github.com/usharesoft/appcenter-docs/pull/764#discussion_r189288133","pull_request_url":"https://api.github.com/repos/usharesoft/appcenter-docs/pulls/764","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/usharesoft/appcenter-docs/pulls/comments/189288133"},"html":{"href":"https://github.com/usharesoft/appcenter-docs/pull/764#discussion_r189288133"},"pull_request":{"href":"https://api.github.com/repos/usharesoft/appcenter-docs/pulls/764"}},"in_reply_to_id":188963536},"pull_request":{"url":"https://api.github.com/repos/usharesoft/appcenter-docs/pulls/764","id":188173275,"html_url":"https://github.com/usharesoft/appcenter-docs/pull/764","diff_url":"https://github.com/usharesoft/appcenter-docs/pull/764.diff","patch_url":"https://github.com/usharesoft/appcenter-docs/pull/764.patch","issue_url":"https://api.github.com/repos/usharesoft/appcenter-docs/issues/764","number":764,"state":"open","locked":false,"title":"Added venv.sh script to automate doc compilation","user":{"login":"thachmai","id":1647008,"avatar_url":"https://avatars0.githubusercontent.com/u/1647008?v=4","gravatar_id":"","url":"https://api.github.com/users/thachmai","html_url":"https://github.com/thachmai","followers_url":"https://api.github.com/users/thachmai/followers","following_url":"https://api.github.com/users/thachmai/following{/other_user}","gists_url":"https://api.github.com/users/thachmai/gists{/gist_id}","starred_url":"https://api.github.com/users/thachmai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thachmai/subscriptions","organizations_url":"https://api.github.com/users/thachmai/orgs","repos_url":"https://api.github.com/users/thachmai/repos","events_url":"https://api.github.com/users/thachmai/events{/privacy}","received_events_url":"https://api.github.com/users/thachmai/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-15T15:45:28Z","updated_at":"2018-05-18T14:31:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ef0053c51b3b05ba5b658aec5533d0ac2409569","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ntith","id":4928197,"avatar_url":"https://avatars0.githubusercontent.com/u/4928197?v=4","gravatar_id":"","url":"https://api.github.com/users/ntith","html_url":"https://github.com/ntith","followers_url":"https://api.github.com/users/ntith/followers","following_url":"https://api.github.com/users/ntith/following{/other_user}","gists_url":"https://api.github.com/users/ntith/gists{/gist_id}","starred_url":"https://api.github.com/users/ntith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntith/subscriptions","organizations_url":"https://api.github.com/users/ntith/orgs","repos_url":"https://api.github.com/users/ntith/repos","events_url":"https://api.github.com/users/ntith/events{/privacy}","received_events_url":"https://api.github.com/users/ntith/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/usharesoft/appcenter-docs/pulls/764/commits","review_comments_url":"https://api.github.com/repos/usharesoft/appcenter-docs/pulls/764/comments","review_comment_url":"https://api.github.com/repos/usharesoft/appcenter-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/usharesoft/appcenter-docs/issues/764/comments","statuses_url":"https://api.github.com/repos/usharesoft/appcenter-docs/statuses/5d4027981a7be432d8222903b1e7fe15e587e91d","head":{"label":"thachmai:master","ref":"master","sha":"5d4027981a7be432d8222903b1e7fe15e587e91d","user":{"login":"thachmai","id":1647008,"avatar_url":"https://avatars0.githubusercontent.com/u/1647008?v=4","gravatar_id":"","url":"https://api.github.com/users/thachmai","html_url":"https://github.com/thachmai","followers_url":"https://api.github.com/users/thachmai/followers","following_url":"https://api.github.com/users/thachmai/following{/other_user}","gists_url":"https://api.github.com/users/thachmai/gists{/gist_id}","starred_url":"https://api.github.com/users/thachmai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thachmai/subscriptions","organizations_url":"https://api.github.com/users/thachmai/orgs","repos_url":"https://api.github.com/users/thachmai/repos","events_url":"https://api.github.com/users/thachmai/events{/privacy}","received_events_url":"https://api.github.com/users/thachmai/received_events","type":"User","site_admin":false},"repo":{"id":133537919,"name":"appcenter-docs","full_name":"thachmai/appcenter-docs","owner":{"login":"thachmai","id":1647008,"avatar_url":"https://avatars0.githubusercontent.com/u/1647008?v=4","gravatar_id":"","url":"https://api.github.com/users/thachmai","html_url":"https://github.com/thachmai","followers_url":"https://api.github.com/users/thachmai/followers","following_url":"https://api.github.com/users/thachmai/following{/other_user}","gists_url":"https://api.github.com/users/thachmai/gists{/gist_id}","starred_url":"https://api.github.com/users/thachmai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thachmai/subscriptions","organizations_url":"https://api.github.com/users/thachmai/orgs","repos_url":"https://api.github.com/users/thachmai/repos","events_url":"https://api.github.com/users/thachmai/events{/privacy}","received_events_url":"https://api.github.com/users/thachmai/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thachmai/appcenter-docs","description":"UForge AppCenter Documentation","fork":true,"url":"https://api.github.com/repos/thachmai/appcenter-docs","forks_url":"https://api.github.com/repos/thachmai/appcenter-docs/forks","keys_url":"https://api.github.com/repos/thachmai/appcenter-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thachmai/appcenter-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thachmai/appcenter-docs/teams","hooks_url":"https://api.github.com/repos/thachmai/appcenter-docs/hooks","issue_events_url":"https://api.github.com/repos/thachmai/appcenter-docs/issues/events{/number}","events_url":"https://api.github.com/repos/thachmai/appcenter-docs/events","assignees_url":"https://api.github.com/repos/thachmai/appcenter-docs/assignees{/user}","branches_url":"https://api.github.com/repos/thachmai/appcenter-docs/branches{/branch}","tags_url":"https://api.github.com/repos/thachmai/appcenter-docs/tags","blobs_url":"https://api.github.com/repos/thachmai/appcenter-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thachmai/appcenter-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thachmai/appcenter-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/thachmai/appcenter-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thachmai/appcenter-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/thachmai/appcenter-docs/languages","stargazers_url":"https://api.github.com/repos/thachmai/appcenter-docs/stargazers","contributors_url":"https://api.github.com/repos/thachmai/appcenter-docs/contributors","subscribers_url":"https://api.github.com/repos/thachmai/appcenter-docs/subscribers","subscription_url":"https://api.github.com/repos/thachmai/appcenter-docs/subscription","commits_url":"https://api.github.com/repos/thachmai/appcenter-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/thachmai/appcenter-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/thachmai/appcenter-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/thachmai/appcenter-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/thachmai/appcenter-docs/contents/{+path}","compare_url":"https://api.github.com/repos/thachmai/appcenter-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thachmai/appcenter-docs/merges","archive_url":"https://api.github.com/repos/thachmai/appcenter-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thachmai/appcenter-docs/downloads","issues_url":"https://api.github.com/repos/thachmai/appcenter-docs/issues{/number}","pulls_url":"https://api.github.com/repos/thachmai/appcenter-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/thachmai/appcenter-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/thachmai/appcenter-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thachmai/appcenter-docs/labels{/name}","releases_url":"https://api.github.com/repos/thachmai/appcenter-docs/releases{/id}","deployments_url":"https://api.github.com/repos/thachmai/appcenter-docs/deployments","created_at":"2018-05-15T15:39:54Z","updated_at":"2018-05-17T12:38:00Z","pushed_at":"2018-05-17T12:37:58Z","git_url":"git://github.com/thachmai/appcenter-docs.git","ssh_url":"git@github.com:thachmai/appcenter-docs.git","clone_url":"https://github.com/thachmai/appcenter-docs.git","svn_url":"https://github.com/thachmai/appcenter-docs","homepage":"","size":28366,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"usharesoft:master","ref":"master","sha":"65e8684d832f35d239d3fabf28212d2aa42d18d3","user":{"login":"usharesoft","id":7059277,"avatar_url":"https://avatars1.githubusercontent.com/u/7059277?v=4","gravatar_id":"","url":"https://api.github.com/users/usharesoft","html_url":"https://github.com/usharesoft","followers_url":"https://api.github.com/users/usharesoft/followers","following_url":"https://api.github.com/users/usharesoft/following{/other_user}","gists_url":"https://api.github.com/users/usharesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/usharesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usharesoft/subscriptions","organizations_url":"https://api.github.com/users/usharesoft/orgs","repos_url":"https://api.github.com/users/usharesoft/repos","events_url":"https://api.github.com/users/usharesoft/events{/privacy}","received_events_url":"https://api.github.com/users/usharesoft/received_events","type":"Organization","site_admin":false},"repo":{"id":52288220,"name":"appcenter-docs","full_name":"usharesoft/appcenter-docs","owner":{"login":"usharesoft","id":7059277,"avatar_url":"https://avatars1.githubusercontent.com/u/7059277?v=4","gravatar_id":"","url":"https://api.github.com/users/usharesoft","html_url":"https://github.com/usharesoft","followers_url":"https://api.github.com/users/usharesoft/followers","following_url":"https://api.github.com/users/usharesoft/following{/other_user}","gists_url":"https://api.github.com/users/usharesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/usharesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usharesoft/subscriptions","organizations_url":"https://api.github.com/users/usharesoft/orgs","repos_url":"https://api.github.com/users/usharesoft/repos","events_url":"https://api.github.com/users/usharesoft/events{/privacy}","received_events_url":"https://api.github.com/users/usharesoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/usharesoft/appcenter-docs","description":"UForge AppCenter Documentation","fork":false,"url":"https://api.github.com/repos/usharesoft/appcenter-docs","forks_url":"https://api.github.com/repos/usharesoft/appcenter-docs/forks","keys_url":"https://api.github.com/repos/usharesoft/appcenter-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/usharesoft/appcenter-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/usharesoft/appcenter-docs/teams","hooks_url":"https://api.github.com/repos/usharesoft/appcenter-docs/hooks","issue_events_url":"https://api.github.com/repos/usharesoft/appcenter-docs/issues/events{/number}","events_url":"https://api.github.com/repos/usharesoft/appcenter-docs/events","assignees_url":"https://api.github.com/repos/usharesoft/appcenter-docs/assignees{/user}","branches_url":"https://api.github.com/repos/usharesoft/appcenter-docs/branches{/branch}","tags_url":"https://api.github.com/repos/usharesoft/appcenter-docs/tags","blobs_url":"https://api.github.com/repos/usharesoft/appcenter-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/usharesoft/appcenter-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/usharesoft/appcenter-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/usharesoft/appcenter-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/usharesoft/appcenter-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/usharesoft/appcenter-docs/languages","stargazers_url":"https://api.github.com/repos/usharesoft/appcenter-docs/stargazers","contributors_url":"https://api.github.com/repos/usharesoft/appcenter-docs/contributors","subscribers_url":"https://api.github.com/repos/usharesoft/appcenter-docs/subscribers","subscription_url":"https://api.github.com/repos/usharesoft/appcenter-docs/subscription","commits_url":"https://api.github.com/repos/usharesoft/appcenter-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/usharesoft/appcenter-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/usharesoft/appcenter-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/usharesoft/appcenter-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/usharesoft/appcenter-docs/contents/{+path}","compare_url":"https://api.github.com/repos/usharesoft/appcenter-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/usharesoft/appcenter-docs/merges","archive_url":"https://api.github.com/repos/usharesoft/appcenter-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/usharesoft/appcenter-docs/downloads","issues_url":"https://api.github.com/repos/usharesoft/appcenter-docs/issues{/number}","pulls_url":"https://api.github.com/repos/usharesoft/appcenter-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/usharesoft/appcenter-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/usharesoft/appcenter-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/usharesoft/appcenter-docs/labels{/name}","releases_url":"https://api.github.com/repos/usharesoft/appcenter-docs/releases{/id}","deployments_url":"https://api.github.com/repos/usharesoft/appcenter-docs/deployments","created_at":"2016-02-22T16:41:17Z","updated_at":"2018-05-17T14:26:22Z","pushed_at":"2018-05-18T14:04:01Z","git_url":"git://github.com/usharesoft/appcenter-docs.git","ssh_url":"git@github.com:usharesoft/appcenter-docs.git","clone_url":"https://github.com/usharesoft/appcenter-docs.git","svn_url":"https://github.com/usharesoft/appcenter-docs","homepage":"","size":28418,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"archived":false,"open_issues_count":14,"license":null,"forks":25,"open_issues":14,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/usharesoft/appcenter-docs/pulls/764"},"html":{"href":"https://github.com/usharesoft/appcenter-docs/pull/764"},"issue":{"href":"https://api.github.com/repos/usharesoft/appcenter-docs/issues/764"},"comments":{"href":"https://api.github.com/repos/usharesoft/appcenter-docs/issues/764/comments"},"review_comments":{"href":"https://api.github.com/repos/usharesoft/appcenter-docs/pulls/764/comments"},"review_comment":{"href":"https://api.github.com/repos/usharesoft/appcenter-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/usharesoft/appcenter-docs/pulls/764/commits"},"statuses":{"href":"https://api.github.com/repos/usharesoft/appcenter-docs/statuses/5d4027981a7be432d8222903b1e7fe15e587e91d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"thachmai"}}