Git电子邮件钩子包括提交消息和更改的文件

min*_*eow 6 git git-svn heroku githooks

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

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

xxx@gmail.com deployed app
Run Code Online (Sandbox Code Playgroud)
#what i need:
noreply@heroku.com to me, hermantamas

xxx@gmail.com deployed app:

"home page is now working"
Changed:
- index.html
- javascript.js
Run Code Online (Sandbox Code Playgroud)

Von*_*onC 6

That would mean modifying the Heorku email hook directly to add some of those git log options (git log --name-status, git log --name-only, git log --stat or git whatchanged)

But since you may not have the possibility to change directly the hook script, you still can add one Heroku variable when defining said mail hook.

git_log: log of commits between this deploy and the last

$ heroku addons:add deployhooks:email \
    recipient=me@example.com \
    subject="Myapp Deployed" \
    body="{{user}} deployed app: {{git_log}}"
Adding deployhooks:email to myapp...Done.
Run Code Online (Sandbox Code Playgroud)