Class: Pronto::Formatter::GithubPullRequestFormatter
- Inherits:
-
Object
- Object
- Pronto::Formatter::GithubPullRequestFormatter
- Defined in:
- lib/pronto/formatter/github_pull_request_formatter.rb
Instance Method Summary collapse
Instance Method Details
#format(messages, repo, patches) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/pronto/formatter/github_pull_request_formatter.rb', line 4 def format(, repo, patches) client = Github.new(repo) head = repo.head_commit_sha = .uniq.map do || body = .msg path = .path line = patches.find_line(.full_path, .line.new_lineno) create_comment(client, head, body, path, line.position) end "#{.compact.count} Pronto messages posted to GitHub" end |