Class: Pronto::Formatter::GithubStatusFormatter
- Inherits:
-
Base
- Object
- Base
- Pronto::Formatter::GithubStatusFormatter
show all
- Defined in:
- lib/pronto/formatter/github_status_formatter.rb,
lib/pronto/formatter/github_status_formatter/sentence.rb,
lib/pronto/formatter/github_status_formatter/status_builder.rb
Defined Under Namespace
Classes: Sentence, StatusBuilder
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#config
Class Method Details
.name ⇒ Object
6
7
8
|
# File 'lib/pronto/formatter/github_status_formatter.rb', line 6
def self.name
'github_status'
end
|
Instance Method Details
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/pronto/formatter/github_status_formatter.rb', line 10
def format(messages, repo, _)
client = Github.new(repo)
head = repo.head_commit_sha
messages_by_runner = messages.uniq.group_by(&:runner)
Runner.runners.each do |runner|
create_status(client, head, runner, messages_by_runner[runner] || [])
end
end
|