diff --git a/README.md b/README.md index c55e6e6..bcf897c 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,18 @@ Heroku Setup ------------ Create the app, enable papertrail to record logs, and set the configuration -variables. +variables. Note: if you have more than one Heroku app associated with your +login, most heroku command lines after "create" (see below) should include +"-a " on the end of the command line. You can also do everything +from the Heroku web page, https://dashboard.heroku.com/apps/, +instead of the command line- however, that's not shown here. ```bash # heroku login - # chapel_github@cray.com + password from Keeppass - # after the first time, the heroku login persists somewhere for a while -heroku create [] + # Create your own login, or use + # chapel_github@cray.com + password from Keeppass. + # After the first time, the heroku login persists somewhere for a while +heroku create heroku addons:add papertrail heroku config:set GITHUB_COMMIT_EMAILER_SEND_FROM_AUTHOR= heroku config:set GITHUB_COMMIT_EMAILER_SENDER= @@ -38,6 +43,13 @@ heroku config:set GITHUB_COMMIT_EMAILER_RECIPIENT= heroku config:set GITHUB_COMMIT_EMAILER_SECRET= ``` +An optional "RECIPIENT_CC" e-mail address may be given, in which case the messages +are Cc'd to that address. + +```bash +heroku config:set GITHUB_COMMIT_EMAILER_RECIPIENT_CC= +``` + If `GITHUB_COMMIT_EMAILER_SEND_FROM_AUTHOR` is set (to any value), the pusher name and email combination will be used as the "From" address instead of the configured sender value. If a reply-to is configured, see below, that will be @@ -68,8 +80,10 @@ heroku addons:add sendgrid heroku addons:open sendgrid ``` -* Go to "Global Settings". -* Check the "Don't convert plain text emails to HTML" box and "Update". +* Go to "Settings"-> "Mail Settings". +* Activate "Plain Content - Convert your plain text emails to HTML." + (ie, "Turn on if you don't want to convert your plain text email to HTML" - + we want plain content, not HTML) Rollbar Setup ------------- @@ -88,13 +102,25 @@ necessary if you have multiple environment configured to use rollbar. heroku config:set GITHUB_COMMIT_EMAILER_ROLLBAR_ENV= ``` +Deploy the Heroku App +--------------------- + +I found this easier to do from the Heroku web page, +https://dashboard.heroku.com/apps//deploy/github. (ie, Heroku +dashboard for app , "Deploy" tab, deployment method "GitHub"). +If you "connect" the Heroku app to this GitHub repo, you can Deploy right +from there. Because "connecting" means allowing auto authentication +to GitHub from Heroku, I preferred not to Deploy as chapel_github@cray.com. +Instead, I deployed from my personal Heroku account, which I added to the +Heroku app as a "collaborator" (see "Access" tab). + GitHub Setup ------------ Add webhook to repo to use this emailer. Be sure to set the secret to the value -of `GITHUB_COMMIT_EMAILER_SECRET`. The webhook URL is -`/commit-email` and it must send "push" events. Show the heroku app -url with: +of `GITHUB_COMMIT_EMAILER_SECRET` (you are free to generate any string). +The webhook URL is `/commit-email` and it must send "push" events in +JSON format. Show the heroku app url with: ```bash heroku domains @@ -174,9 +200,10 @@ tox -e flake8 tox -e coverage ``` -Update: 2017-10-04 +Update: 2017-10-19 ------------------ -Added GITHUB_COMMIT_EMAILER_RECIPIENT_CC +Readme is updated as deployed to Heroku app chapel-commit-emailer2 +(https://dashboard.heroku.com/apps/chapel-commit-emailer2) [0]: https://toolbelt.heroku.com/