Skip to content

Instantly share code, notes, and snippets.

@asonas
Last active December 24, 2015 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asonas/6844690 to your computer and use it in GitHub Desktop.
Save asonas/6844690 to your computer and use it in GitHub Desktop.
after "deploy", "deploy:notify_revision"
namespace :deploy do
task :notify_revision do
user_name = `git config --global user.name`.gsub("\n", '')
github_path = "https://github.com/asonas/asonas.jp/commit/#{current_revision}"
body = "#{user_name} deployed a new version of plife (#{current_revision[0...8]}) #{github_path}"
idobata_hook_url = "https://idobata.io/hook/xxxxx-xxxxx-xxxxx" # Room Settings > Manage hooks
run "curl #{idobata_hook_url} -d 'body=#{body}'"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment