Class: TxghServer::Webhooks::Gitlab::StatusUpdater
Instance Attribute Summary
#branch, #project, #repo
Instance Method Summary
collapse
#initialize
Instance Method Details
#report_error_and_update_status(error) ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/txgh-server/webhooks/gitlab/status_updater.rb', line 7
def report_error_and_update_status(error)
error_params = Txgh.events.publish_error!(error)
Txgh.events.publish_each('gitlab.status.error', error_params) do |status_params|
if status_params
update_status_safely do
Txgh::GitlabStatus.error(project, repo, branch, status_params)
end
end
end
end
|
#update_status ⇒ Object
19
20
21
22
23
|
# File 'lib/txgh-server/webhooks/gitlab/status_updater.rb', line 19
def update_status
update_status_safely do
Txgh::GitlabStatus.update(project, repo, branch)
end
end
|