GitHub PullRequestReviewCommentEvent at 2014-01-03 22:28:54
Repository: capistrano-deploy
Actor: jbabe
Payload: {"comment":{"url":"https://api.github.com/repos/amaabca/capistrano-deploy/pulls/comments/8647144","id":8647144,"diff_hunk":"@@ -0,0 +1,35 @@\n+module CapistranoDeploy\n+  module Environment\n+    def self.load_into(configuration)\n+      configuration.load do\n+\n+        set(:environment_file) { \".env\" }\n+\n+        namespace :environment do\n+          desc \"Copy ENV file from remote git repository to your staging/production servers\"\n+          task :fetch_config, :roles => :app, :except => {:no_release => true} do\n+            path_to_new_env = File.join deploy_to, \"tmp\", \"env_config\", app_name, \".env.#{current_stage}\"\n+            path_to_old_env = File.join deploy_to, environment_file\n+\n+            run \"rm -rf #{deploy_to}/tmp/env_config && git clone -n #{environment_repository} --depth 1 #{deploy_to}/tmp/env_config\"\n+            run \"cd #{deploy_to}/tmp/env_config && git checkout HEAD #{app_name}/.env.#{current_stage}\"\n+\n+            lines_changed = capture(\"diff #{path_to_new_env} #{path_to_old_env} | wc -l\").chomp.to_i","path":"lib/capistrano-deploy/environment.rb","position":17,"original_position":17,"commit_id":"3985d7b67cd71ef2af005fdaab87ccc896aeb1c0","original_commit_id":"3985d7b67cd71ef2af005fdaab87ccc896aeb1c0","user":{"login":"jbabe","id":547777,"avatar_url":"https://gravatar.com/avatar/9ba57c27a5aaf78f6ba78da2575f7c09?d=https%3A%2F%2Fidenticons.github.com%2F40d44f6ff423892609b2b73724e73276.png&r=x","gravatar_id":"9ba57c27a5aaf78f6ba78da2575f7c09","url":"https://api.github.com/users/jbabe","html_url":"https://github.com/jbabe","followers_url":"https://api.github.com/users/jbabe/followers","following_url":"https://api.github.com/users/jbabe/following{/other_user}","gists_url":"https://api.github.com/users/jbabe/gists{/gist_id}","starred_url":"https://api.github.com/users/jbabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbabe/subscriptions","organizations_url":"https://api.github.com/users/jbabe/orgs","repos_url":"https://api.github.com/users/jbabe/repos","events_url":"https://api.github.com/users/jbabe/events{/privacy}","received_events_url":"https://api.github.com/users/jbabe/received_events","type":"User","site_admin":false},"body":"piping to `wc -l` because otherwise `diff` returns a non-zero exit status and Capistrano raises a `Capistrano::CommandError`","created_at":"2014-01-03T22:28:54Z","updated_at":"2014-01-03T22:28:54Z","html_url":"https://github.com/amaabca/capistrano-deploy/pull/9#discussion_r8647144","pull_request_url":"https://api.github.com/repos/amaabca/capistrano-deploy/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/amaabca/capistrano-deploy/pulls/comments/8647144"},"html":{"href":"https://github.com/amaabca/capistrano-deploy/pull/9#discussion_r8647144"},"pull_request":{"href":"https://api.github.com/repos/amaabca/capistrano-deploy/pulls/9"}}}}