6

我在 heroku 中为 git 设置了电子邮件挂钩。但是,我得到的只是推送消息的消息-我需要提交消息和修改后的文件。

#what i now get in the email:
noreply@heroku.com to me, hermantamas

xxx@gmail.com deployed app

#what i need:
noreply@heroku.com to me, hermantamas

xxx@gmail.com deployed app:

"home page is now working"
Changed:
- index.html
- javascript.js
4

1 回答 1

6

这意味着直接修改Heorku 电子邮件挂钩以添加其中一些git日志选项git log --name-status、、git log --name-only或)git log --statgit whatchanged

但是由于您可能无法直接更改挂钩脚本,因此您仍然可以在定义所述邮件挂钩时添加一个Heroku 变量。

git_log:本次部署和上次部署之间的提交日志

$ heroku addons:add deployhooks:email \
    recipient=me@example.com \
    subject="Myapp Deployed" \
    body="{{user}} deployed app: {{git_log}}"
Adding deployhooks:email to myapp...Done.
于 2010-12-10T07:11:20.567 回答