Announcement

Collapse
No announcement yet.

Send email when commit failed

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Send email when commit failed

    I would like to know how to send a warning as an email when the commit fails.

  • #2
    I know of no "hook" for failure. Therefore, if you want to send a message when a commit fails you would need to install a pre-commit and post-commit hook. The pre-commit hook would record the details of the commit attempt and the exact time. The post-commit would then clear the record of the attempt. Any uncleared records, after a minor amount of time (commits should take seconds so let's call it a minute) would trigger the notification. That said, you definitely are going to get false negatives (notifications when things actually succeeded) due to the fact that post-hooks are not guaranteed to fire. That effect should be minimal but expect it.

    Comment

    Working...
    X