【问题标题】:Git email hook to include commit message and changed filesGit 电子邮件挂钩以包含提交消息和更改的文件
【发布时间】:2011-05-23 07:22:40
【问题描述】:

我在 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

【问题讨论】:

    标签: git heroku git-svn githooks


    【解决方案1】:

    这意味着直接修改Heorku email hook 以添加一些those git log optionsgit log --name-statusgit log --name-onlygit log --statgit whatchanged

    但由于你可能无法直接更改钩子脚本,你仍然可以在定义邮件钩子时添加一个Heroku variable

    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.
    

    【讨论】:

      猜你喜欢
      • 2016-04-23
      • 1970-01-01
      • 2012-08-23
      • 2016-07-16
      • 1970-01-01
      • 1970-01-01
      • 2018-04-27
      • 1970-01-01
      相关资源
      最近更新 更多