{"action":"created","comment":{"url":"https://api.github.com/repos/gengo/goship/pulls/comments/28747285","id":28747285,"diff_hunk":"@@ -613,6 +628,55 @@ func DeployHandler(w http.ResponseWriter, r *http.Request) {\n \t}\n }\n \n+// CommentHandler allows you to update a comment on an environment\n+// i.e. http://127.0.0.1:8000/comment?environment=staging&project=admin&comment=DONOTDEPLOYPLEASE!\n+func CommentHandler(w http.ResponseWriter, r *http.Request) {\n+\n+\tc := etcd.NewClient([]string{*ETCDServer})\n+\tp := r.FormValue(\"project\")\n+\tenv := r.FormValue(\"environment\")\n+\tcomment := r.FormValue(\"comment\")\n+\terr := goship.SetComment(c, p, env, comment)\n+\tif err != nil {\n+\t\tlog.Println(\"ERROR: \", err)\n+\t\thttp.Error(w, err.Error(), http.StatusBadRequest)\n+\t\treturn\n+\t}\n+\thttp.Redirect(w, r, \"/\", http.StatusFound)\n+\n+}\n+\n+// LockHandler allows you to lock an environment\n+// http://127.0.0.1:8000/lock?environment=staging&project=admin\n+func LockHandler(w http.ResponseWriter, r *http.Request) {\n+\n+\tc := etcd.NewClient([]string{*ETCDServer})\n+\tp := r.FormValue(\"project\")\n+\tenv := r.FormValue(\"environment\")\n+\terr := goship.LockEnvironment(c, p, env, \"true\")\n+\tif err != nil {\n+\t\tlog.Println(\"ERROR: \", err)\n+\t\thttp.Error(w, err.Error(), http.StatusBadRequest)\n+\t\treturn\n+\t}\n+\thttp.Redirect(w, r, \"/\", http.StatusMovedPermanently)\n+}\n+\n+// UnLockHandler allows you to unlock an environment\n+// http://127.0.0.1:8000/lock?environment=staging&project=admin","path":"goship.go","position":121,"original_position":121,"commit_id":"9fe24514cea3772364d53c906fa28bb82f6afe1b","original_commit_id":"9fe24514cea3772364d53c906fa28bb82f6afe1b","user":{"login":"kelvintaywl","id":2164346,"avatar_url":"https://avatars.githubusercontent.com/u/2164346?v=3","gravatar_id":"","url":"https://api.github.com/users/kelvintaywl","html_url":"https://github.com/kelvintaywl","followers_url":"https://api.github.com/users/kelvintaywl/followers","following_url":"https://api.github.com/users/kelvintaywl/following{/other_user}","gists_url":"https://api.github.com/users/kelvintaywl/gists{/gist_id}","starred_url":"https://api.github.com/users/kelvintaywl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kelvintaywl/subscriptions","organizations_url":"https://api.github.com/users/kelvintaywl/orgs","repos_url":"https://api.github.com/users/kelvintaywl/repos","events_url":"https://api.github.com/users/kelvintaywl/events{/privacy}","received_events_url":"https://api.github.com/users/kelvintaywl/received_events","type":"User","site_admin":false},"body":"`lock` -> `unlock` perhaps?\r\n\r\n```\r\n// http://127.0.0.1:8000/unlock?environment=staging&project=admin\r\n```","created_at":"2015-04-21T03:13:25Z","updated_at":"2015-04-21T03:13:25Z","html_url":"https://github.com/gengo/goship/pull/129#discussion_r28747285","pull_request_url":"https://api.github.com/repos/gengo/goship/pulls/129","_links":{"self":{"href":"https://api.github.com/repos/gengo/goship/pulls/comments/28747285"},"html":{"href":"https://github.com/gengo/goship/pull/129#discussion_r28747285"},"pull_request":{"href":"https://api.github.com/repos/gengo/goship/pulls/129"}}},"pull_request":{"url":"https://api.github.com/repos/gengo/goship/pulls/129","id":33724542,"html_url":"https://github.com/gengo/goship/pull/129","diff_url":"https://github.com/gengo/goship/pull/129.diff","patch_url":"https://github.com/gengo/goship/pull/129.patch","issue_url":"https://api.github.com/repos/gengo/goship/issues/129","number":129,"state":"open","locked":false,"title":"<NOT READY> 92205218 lockmode","user":{"login":"ramen74","id":812595,"avatar_url":"https://avatars.githubusercontent.com/u/812595?v=3","gravatar_id":"","url":"https://api.github.com/users/ramen74","html_url":"https://github.com/ramen74","followers_url":"https://api.github.com/users/ramen74/followers","following_url":"https://api.github.com/users/ramen74/following{/other_user}","gists_url":"https://api.github.com/users/ramen74/gists{/gist_id}","starred_url":"https://api.github.com/users/ramen74/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramen74/subscriptions","organizations_url":"https://api.github.com/users/ramen74/orgs","repos_url":"https://api.github.com/users/ramen74/repos","events_url":"https://api.github.com/users/ramen74/events{/privacy}","received_events_url":"https://api.github.com/users/ramen74/received_events","type":"User","site_admin":false},"body":"Initial crack at Read-Only access for pull team members.\r\nComment and Lock Functionality. \r\nSome other cleanup.\r\nLOCK UI is a bit clunky now.  ","created_at":"2015-04-21T02:39:10Z","updated_at":"2015-04-21T03:13:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06b19084aa91e474bdc934393bc078f0d31c1918","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gengo/goship/pulls/129/commits","review_comments_url":"https://api.github.com/repos/gengo/goship/pulls/129/comments","review_comment_url":"https://api.github.com/repos/gengo/goship/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gengo/goship/issues/129/comments","statuses_url":"https://api.github.com/repos/gengo/goship/statuses/9fe24514cea3772364d53c906fa28bb82f6afe1b","head":{"label":"gengo:92205218_lockmode","ref":"92205218_lockmode","sha":"9fe24514cea3772364d53c906fa28bb82f6afe1b","user":{"login":"gengo","id":1681251,"avatar_url":"https://avatars.githubusercontent.com/u/1681251?v=3","gravatar_id":"","url":"https://api.github.com/users/gengo","html_url":"https://github.com/gengo","followers_url":"https://api.github.com/users/gengo/followers","following_url":"https://api.github.com/users/gengo/following{/other_user}","gists_url":"https://api.github.com/users/gengo/gists{/gist_id}","starred_url":"https://api.github.com/users/gengo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gengo/subscriptions","organizations_url":"https://api.github.com/users/gengo/orgs","repos_url":"https://api.github.com/users/gengo/repos","events_url":"https://api.github.com/users/gengo/events{/privacy}","received_events_url":"https://api.github.com/users/gengo/received_events","type":"Organization","site_admin":false},"repo":{"id":12479555,"name":"goship","full_name":"gengo/goship","owner":{"login":"gengo","id":1681251,"avatar_url":"https://avatars.githubusercontent.com/u/1681251?v=3","gravatar_id":"","url":"https://api.github.com/users/gengo","html_url":"https://github.com/gengo","followers_url":"https://api.github.com/users/gengo/followers","following_url":"https://api.github.com/users/gengo/following{/other_user}","gists_url":"https://api.github.com/users/gengo/gists{/gist_id}","starred_url":"https://api.github.com/users/gengo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gengo/subscriptions","organizations_url":"https://api.github.com/users/gengo/orgs","repos_url":"https://api.github.com/users/gengo/repos","events_url":"https://api.github.com/users/gengo/events{/privacy}","received_events_url":"https://api.github.com/users/gengo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gengo/goship","description":"A simple tool for deploying code to servers.","fork":false,"url":"https://api.github.com/repos/gengo/goship","forks_url":"https://api.github.com/repos/gengo/goship/forks","keys_url":"https://api.github.com/repos/gengo/goship/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gengo/goship/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gengo/goship/teams","hooks_url":"https://api.github.com/repos/gengo/goship/hooks","issue_events_url":"https://api.github.com/repos/gengo/goship/issues/events{/number}","events_url":"https://api.github.com/repos/gengo/goship/events","assignees_url":"https://api.github.com/repos/gengo/goship/assignees{/user}","branches_url":"https://api.github.com/repos/gengo/goship/branches{/branch}","tags_url":"https://api.github.com/repos/gengo/goship/tags","blobs_url":"https://api.github.com/repos/gengo/goship/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gengo/goship/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gengo/goship/git/refs{/sha}","trees_url":"https://api.github.com/repos/gengo/goship/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gengo/goship/statuses/{sha}","languages_url":"https://api.github.com/repos/gengo/goship/languages","stargazers_url":"https://api.github.com/repos/gengo/goship/stargazers","contributors_url":"https://api.github.com/repos/gengo/goship/contributors","subscribers_url":"https://api.github.com/repos/gengo/goship/subscribers","subscription_url":"https://api.github.com/repos/gengo/goship/subscription","commits_url":"https://api.github.com/repos/gengo/goship/commits{/sha}","git_commits_url":"https://api.github.com/repos/gengo/goship/git/commits{/sha}","comments_url":"https://api.github.com/repos/gengo/goship/comments{/number}","issue_comment_url":"https://api.github.com/repos/gengo/goship/issues/comments{/number}","contents_url":"https://api.github.com/repos/gengo/goship/contents/{+path}","compare_url":"https://api.github.com/repos/gengo/goship/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gengo/goship/merges","archive_url":"https://api.github.com/repos/gengo/goship/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gengo/goship/downloads","issues_url":"https://api.github.com/repos/gengo/goship/issues{/number}","pulls_url":"https://api.github.com/repos/gengo/goship/pulls{/number}","milestones_url":"https://api.github.com/repos/gengo/goship/milestones{/number}","notifications_url":"https://api.github.com/repos/gengo/goship/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gengo/goship/labels{/name}","releases_url":"https://api.github.com/repos/gengo/goship/releases{/id}","created_at":"2013-08-30T06:20:15Z","updated_at":"2015-04-21T00:36:51Z","pushed_at":"2015-04-21T02:39:10Z","git_url":"git://github.com/gengo/goship.git","ssh_url":"git@github.com:gengo/goship.git","clone_url":"https://github.com/gengo/goship.git","svn_url":"https://github.com/gengo/goship","homepage":"","size":3338,"stargazers_count":398,"watchers_count":398,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":8,"forks":20,"open_issues":8,"watchers":398,"default_branch":"master"}},"base":{"label":"gengo:master","ref":"master","sha":"d3feba7e8c67c8486cef2ed38fe1dcf1407ac633","user":{"login":"gengo","id":1681251,"avatar_url":"https://avatars.githubusercontent.com/u/1681251?v=3","gravatar_id":"","url":"https://api.github.com/users/gengo","html_url":"https://github.com/gengo","followers_url":"https://api.github.com/users/gengo/followers","following_url":"https://api.github.com/users/gengo/following{/other_user}","gists_url":"https://api.github.com/users/gengo/gists{/gist_id}","starred_url":"https://api.github.com/users/gengo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gengo/subscriptions","organizations_url":"https://api.github.com/users/gengo/orgs","repos_url":"https://api.github.com/users/gengo/repos","events_url":"https://api.github.com/users/gengo/events{/privacy}","received_events_url":"https://api.github.com/users/gengo/received_events","type":"Organization","site_admin":false},"repo":{"id":12479555,"name":"goship","full_name":"gengo/goship","owner":{"login":"gengo","id":1681251,"avatar_url":"https://avatars.githubusercontent.com/u/1681251?v=3","gravatar_id":"","url":"https://api.github.com/users/gengo","html_url":"https://github.com/gengo","followers_url":"https://api.github.com/users/gengo/followers","following_url":"https://api.github.com/users/gengo/following{/other_user}","gists_url":"https://api.github.com/users/gengo/gists{/gist_id}","starred_url":"https://api.github.com/users/gengo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gengo/subscriptions","organizations_url":"https://api.github.com/users/gengo/orgs","repos_url":"https://api.github.com/users/gengo/repos","events_url":"https://api.github.com/users/gengo/events{/privacy}","received_events_url":"https://api.github.com/users/gengo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gengo/goship","description":"A simple tool for deploying code to servers.","fork":false,"url":"https://api.github.com/repos/gengo/goship","forks_url":"https://api.github.com/repos/gengo/goship/forks","keys_url":"https://api.github.com/repos/gengo/goship/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gengo/goship/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gengo/goship/teams","hooks_url":"https://api.github.com/repos/gengo/goship/hooks","issue_events_url":"https://api.github.com/repos/gengo/goship/issues/events{/number}","events_url":"https://api.github.com/repos/gengo/goship/events","assignees_url":"https://api.github.com/repos/gengo/goship/assignees{/user}","branches_url":"https://api.github.com/repos/gengo/goship/branches{/branch}","tags_url":"https://api.github.com/repos/gengo/goship/tags","blobs_url":"https://api.github.com/repos/gengo/goship/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gengo/goship/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gengo/goship/git/refs{/sha}","trees_url":"https://api.github.com/repos/gengo/goship/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gengo/goship/statuses/{sha}","languages_url":"https://api.github.com/repos/gengo/goship/languages","stargazers_url":"https://api.github.com/repos/gengo/goship/stargazers","contributors_url":"https://api.github.com/repos/gengo/goship/contributors","subscribers_url":"https://api.github.com/repos/gengo/goship/subscribers","subscription_url":"https://api.github.com/repos/gengo/goship/subscription","commits_url":"https://api.github.com/repos/gengo/goship/commits{/sha}","git_commits_url":"https://api.github.com/repos/gengo/goship/git/commits{/sha}","comments_url":"https://api.github.com/repos/gengo/goship/comments{/number}","issue_comment_url":"https://api.github.com/repos/gengo/goship/issues/comments{/number}","contents_url":"https://api.github.com/repos/gengo/goship/contents/{+path}","compare_url":"https://api.github.com/repos/gengo/goship/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gengo/goship/merges","archive_url":"https://api.github.com/repos/gengo/goship/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gengo/goship/downloads","issues_url":"https://api.github.com/repos/gengo/goship/issues{/number}","pulls_url":"https://api.github.com/repos/gengo/goship/pulls{/number}","milestones_url":"https://api.github.com/repos/gengo/goship/milestones{/number}","notifications_url":"https://api.github.com/repos/gengo/goship/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gengo/goship/labels{/name}","releases_url":"https://api.github.com/repos/gengo/goship/releases{/id}","created_at":"2013-08-30T06:20:15Z","updated_at":"2015-04-21T00:36:51Z","pushed_at":"2015-04-21T02:39:10Z","git_url":"git://github.com/gengo/goship.git","ssh_url":"git@github.com:gengo/goship.git","clone_url":"https://github.com/gengo/goship.git","svn_url":"https://github.com/gengo/goship","homepage":"","size":3338,"stargazers_count":398,"watchers_count":398,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":8,"forks":20,"open_issues":8,"watchers":398,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gengo/goship/pulls/129"},"html":{"href":"https://github.com/gengo/goship/pull/129"},"issue":{"href":"https://api.github.com/repos/gengo/goship/issues/129"},"comments":{"href":"https://api.github.com/repos/gengo/goship/issues/129/comments"},"review_comments":{"href":"https://api.github.com/repos/gengo/goship/pulls/129/comments"},"review_comment":{"href":"https://api.github.com/repos/gengo/goship/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gengo/goship/pulls/129/commits"},"statuses":{"href":"https://api.github.com/repos/gengo/goship/statuses/9fe24514cea3772364d53c906fa28bb82f6afe1b"}}}}