{"action":"created","comment":{"url":"https://api.github.com/repos/lsst/lsstsw/pulls/comments/283909693","pull_request_review_id":237346160,"id":283909693,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI4MzkwOTY5Mw==","diff_hunk":"@@ -0,0 +1,147 @@\n+#!/bin/bash\n+\n+# setup lsstsw environment\n+#\n+# source this file from your ~/.bashrc or ~/.zshrc\n+#\n+# relative to <lsstsw>/bin/\n+\n+print_error() {\n+  >&2 echo -e \"$@\"\n+}\n+\n+usage() {\n+  if [[ ! -z \"$1\" ]]; then\n+    print_error \"$0: $1\"\n+  fi\n+\n+  # note that heredocs are prefixed with tab chars\n+  echo \"$(cat <<-EOF\n+\n+\t\tUsage: $0  [-i] [-r] [-b] [-h]\n+\n+\t\tSpecific options:\n+        -i          interactive, propose a list of available environment\n+        -r REF      environment name\n+        -b bXXXX    activate the environment already used for the build with id bXXXX\n+        -h          show this message\n+\n+\t\tEOF\n+  )\"\n+\n+  finish=true\n+   \n+}\n+\n+parse_args() {\n+  local OPTIND\n+  local opt\n+\n+  while getopts \"hrib\" opt; do\n+    case \"$opt\" in\n+    b)\n+      shift;\n+      BUILD_ID=$1\n+      ;;\n+    i)\n+      INTERACTIVE=true\n+      ;;\n+    h)\n+      usage\n+      ;;\n+    r)\n+      shift;\n+      ENVREF=$1\n+      ;;\n+    *)\n+      usage \"Unknown option: ${opt}\"\n+      ;;\n+    esac\n+  done\n+  shift $((OPTIND-1))\n+}\n+\n+##############\n+\n+INTERACTIVE=false\n+ENVREF=\"\"\n+BUILD_ID=\"\"\n+\n+parse_args \"$@\"\n+\n+if [[ !$finish ]]; then\n+\n+\n+if [[ -z $ZSH_NAME ]]; then","path":"bin/envconfig","position":75,"original_position":75,"commit_id":"6877992a3de8633c99892a4858ac728d192f78de","original_commit_id":"6877992a3de8633c99892a4858ac728d192f78de","user":{"login":"ktlim","id":1054393,"node_id":"MDQ6VXNlcjEwNTQzOTM=","avatar_url":"https://avatars3.githubusercontent.com/u/1054393?v=4","gravatar_id":"","url":"https://api.github.com/users/ktlim","html_url":"https://github.com/ktlim","followers_url":"https://api.github.com/users/ktlim/followers","following_url":"https://api.github.com/users/ktlim/following{/other_user}","gists_url":"https://api.github.com/users/ktlim/gists{/gist_id}","starred_url":"https://api.github.com/users/ktlim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktlim/subscriptions","organizations_url":"https://api.github.com/users/ktlim/orgs","repos_url":"https://api.github.com/users/ktlim/repos","events_url":"https://api.github.com/users/ktlim/events{/privacy}","received_events_url":"https://api.github.com/users/ktlim/received_events","type":"User","site_admin":false},"body":"This repeats a lot of `setup.sh`.  Can the common code be factored out?","created_at":"2019-05-14T17:15:12Z","updated_at":"2019-05-14T17:24:05Z","html_url":"https://github.com/lsst/lsstsw/pull/234#discussion_r283909693","pull_request_url":"https://api.github.com/repos/lsst/lsstsw/pulls/234","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/lsst/lsstsw/pulls/comments/283909693"},"html":{"href":"https://github.com/lsst/lsstsw/pull/234#discussion_r283909693"},"pull_request":{"href":"https://api.github.com/repos/lsst/lsstsw/pulls/234"}}},"pull_request":{"url":"https://api.github.com/repos/lsst/lsstsw/pulls/234","id":275877922,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc1ODc3OTIy","html_url":"https://github.com/lsst/lsstsw/pull/234","diff_url":"https://github.com/lsst/lsstsw/pull/234.diff","patch_url":"https://github.com/lsst/lsstsw/pull/234.patch","issue_url":"https://api.github.com/repos/lsst/lsstsw/issues/234","number":234,"state":"open","locked":false,"title":"DM-18112: Updates to deal with multiple environments","user":{"login":"gcomoretto","id":32217421,"node_id":"MDQ6VXNlcjMyMjE3NDIx","avatar_url":"https://avatars2.githubusercontent.com/u/32217421?v=4","gravatar_id":"","url":"https://api.github.com/users/gcomoretto","html_url":"https://github.com/gcomoretto","followers_url":"https://api.github.com/users/gcomoretto/followers","following_url":"https://api.github.com/users/gcomoretto/following{/other_user}","gists_url":"https://api.github.com/users/gcomoretto/gists{/gist_id}","starred_url":"https://api.github.com/users/gcomoretto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gcomoretto/subscriptions","organizations_url":"https://api.github.com/users/gcomoretto/orgs","repos_url":"https://api.github.com/users/gcomoretto/repos","events_url":"https://api.github.com/users/gcomoretto/events{/privacy}","received_events_url":"https://api.github.com/users/gcomoretto/received_events","type":"User","site_admin":false},"body":"bin/deploy\r\n   updated to deploy specific scipipe_conda_env references\r\n\r\nbin/rebuild\r\n  updated to store requirement information\r\n\r\nbin/envconfig\r\n  new to setup different available environment previously deployed","created_at":"2019-05-03T23:41:35Z","updated_at":"2019-05-14T17:24:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"852f12ffafa7400528beacf921a253a7c6ac6715","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lsst/lsstsw/pulls/234/commits","review_comments_url":"https://api.github.com/repos/lsst/lsstsw/pulls/234/comments","review_comment_url":"https://api.github.com/repos/lsst/lsstsw/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lsst/lsstsw/issues/234/comments","statuses_url":"https://api.github.com/repos/lsst/lsstsw/statuses/6877992a3de8633c99892a4858ac728d192f78de","head":{"label":"lsst:tickets/DM-18112","ref":"tickets/DM-18112","sha":"6877992a3de8633c99892a4858ac728d192f78de","user":{"login":"lsst","id":1134504,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMzQ1MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1134504?v=4","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"repo":{"id":23013304,"node_id":"MDEwOlJlcG9zaXRvcnkyMzAxMzMwNA==","name":"lsstsw","full_name":"lsst/lsstsw","private":false,"owner":{"login":"lsst","id":1134504,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMzQ1MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1134504?v=4","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/lsst/lsstsw","description":"loadLSST","fork":false,"url":"https://api.github.com/repos/lsst/lsstsw","forks_url":"https://api.github.com/repos/lsst/lsstsw/forks","keys_url":"https://api.github.com/repos/lsst/lsstsw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/lsstsw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/lsstsw/teams","hooks_url":"https://api.github.com/repos/lsst/lsstsw/hooks","issue_events_url":"https://api.github.com/repos/lsst/lsstsw/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/lsstsw/events","assignees_url":"https://api.github.com/repos/lsst/lsstsw/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/lsstsw/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/lsstsw/tags","blobs_url":"https://api.github.com/repos/lsst/lsstsw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/lsstsw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/lsstsw/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/lsstsw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/lsstsw/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/lsstsw/languages","stargazers_url":"https://api.github.com/repos/lsst/lsstsw/stargazers","contributors_url":"https://api.github.com/repos/lsst/lsstsw/contributors","subscribers_url":"https://api.github.com/repos/lsst/lsstsw/subscribers","subscription_url":"https://api.github.com/repos/lsst/lsstsw/subscription","commits_url":"https://api.github.com/repos/lsst/lsstsw/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/lsstsw/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/lsstsw/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/lsstsw/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/lsstsw/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/lsstsw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/lsstsw/merges","archive_url":"https://api.github.com/repos/lsst/lsstsw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/lsstsw/downloads","issues_url":"https://api.github.com/repos/lsst/lsstsw/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/lsstsw/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/lsstsw/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/lsstsw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/lsstsw/labels{/name}","releases_url":"https://api.github.com/repos/lsst/lsstsw/releases{/id}","deployments_url":"https://api.github.com/repos/lsst/lsstsw/deployments","created_at":"2014-08-16T07:43:19Z","updated_at":"2019-03-27T23:01:55Z","pushed_at":"2019-05-08T19:33:29Z","git_url":"git://github.com/lsst/lsstsw.git","ssh_url":"git@github.com:lsst/lsstsw.git","clone_url":"https://github.com/lsst/lsstsw.git","svn_url":"https://github.com/lsst/lsstsw","homepage":"","size":425,"stargazers_count":5,"watchers_count":5,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":6,"license":null,"forks":11,"open_issues":6,"watchers":5,"default_branch":"master"}},"base":{"label":"lsst:master","ref":"master","sha":"4dfddb541594e0281d23571c274228eb98a84fc2","user":{"login":"lsst","id":1134504,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMzQ1MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1134504?v=4","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"repo":{"id":23013304,"node_id":"MDEwOlJlcG9zaXRvcnkyMzAxMzMwNA==","name":"lsstsw","full_name":"lsst/lsstsw","private":false,"owner":{"login":"lsst","id":1134504,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMzQ1MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1134504?v=4","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/lsst/lsstsw","description":"loadLSST","fork":false,"url":"https://api.github.com/repos/lsst/lsstsw","forks_url":"https://api.github.com/repos/lsst/lsstsw/forks","keys_url":"https://api.github.com/repos/lsst/lsstsw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/lsstsw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/lsstsw/teams","hooks_url":"https://api.github.com/repos/lsst/lsstsw/hooks","issue_events_url":"https://api.github.com/repos/lsst/lsstsw/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/lsstsw/events","assignees_url":"https://api.github.com/repos/lsst/lsstsw/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/lsstsw/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/lsstsw/tags","blobs_url":"https://api.github.com/repos/lsst/lsstsw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/lsstsw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/lsstsw/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/lsstsw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/lsstsw/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/lsstsw/languages","stargazers_url":"https://api.github.com/repos/lsst/lsstsw/stargazers","contributors_url":"https://api.github.com/repos/lsst/lsstsw/contributors","subscribers_url":"https://api.github.com/repos/lsst/lsstsw/subscribers","subscription_url":"https://api.github.com/repos/lsst/lsstsw/subscription","commits_url":"https://api.github.com/repos/lsst/lsstsw/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/lsstsw/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/lsstsw/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/lsstsw/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/lsstsw/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/lsstsw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/lsstsw/merges","archive_url":"https://api.github.com/repos/lsst/lsstsw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/lsstsw/downloads","issues_url":"https://api.github.com/repos/lsst/lsstsw/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/lsstsw/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/lsstsw/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/lsstsw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/lsstsw/labels{/name}","releases_url":"https://api.github.com/repos/lsst/lsstsw/releases{/id}","deployments_url":"https://api.github.com/repos/lsst/lsstsw/deployments","created_at":"2014-08-16T07:43:19Z","updated_at":"2019-03-27T23:01:55Z","pushed_at":"2019-05-08T19:33:29Z","git_url":"git://github.com/lsst/lsstsw.git","ssh_url":"git@github.com:lsst/lsstsw.git","clone_url":"https://github.com/lsst/lsstsw.git","svn_url":"https://github.com/lsst/lsstsw","homepage":"","size":425,"stargazers_count":5,"watchers_count":5,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":6,"license":null,"forks":11,"open_issues":6,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lsst/lsstsw/pulls/234"},"html":{"href":"https://github.com/lsst/lsstsw/pull/234"},"issue":{"href":"https://api.github.com/repos/lsst/lsstsw/issues/234"},"comments":{"href":"https://api.github.com/repos/lsst/lsstsw/issues/234/comments"},"review_comments":{"href":"https://api.github.com/repos/lsst/lsstsw/pulls/234/comments"},"review_comment":{"href":"https://api.github.com/repos/lsst/lsstsw/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lsst/lsstsw/pulls/234/commits"},"statuses":{"href":"https://api.github.com/repos/lsst/lsstsw/statuses/6877992a3de8633c99892a4858ac728d192f78de"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ktlim"}}