Class: Pronto::Formatter::GithubFormatter
- Inherits:
-
Object
- Object
- Pronto::Formatter::GithubFormatter
- Defined in:
- lib/pronto/formatter/github_formatter.rb
Instance Method Summary collapse
Instance Method Details
#format(messages, repo) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/pronto/formatter/github_formatter.rb', line 4 def format(, repo) = .map do || github_slug = repo.github_slug sha = .commit_sha body = .msg path = .path position = .line.commit_line.position if .line comment = Github::Comment.new(github_slug, sha, body, path, position) create_comment(github_slug, sha, comment) end "#{.compact.count} Pronto messages posted to GitHub" end |