public
Description: Simple Ruby on Rails app to catch github's webhooks and perform various tasks
Homepage:
Clone URL: git://github.com/tekkub/github_catcher.git
github_catcher / app / models / commit_mailer.rb
100755 21 lines (16 sloc) 0.594 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class CommitMailer < ActionMailer::Base
 
helper :mailer
 
  def commit_notification(recipient, repo_name, commit_sha1, commit, branch)
    subject "[#{repo_name} commit] " + commit["message"].split("\n").first
    recipients recipient
    from 'github-commits@tekkub.net'
    body :commit => commit, :branch => branch
  end
 
  def cia(repo_name, commit_sha1, commit, branch)
    subject 'DeliverXML'
    recipients 'cia@cia.vc'
    from 'github-commits@tekkub.net'
    content_type "text/xml"
    body :commit => commit, :branch => branch, :source => repo_name, :sha1 => commit_sha1
  end
 
end