Commit fa858882 authored by Johannes Becker's avatar Johannes Becker

Syntax cleanup

parent 64e012a3
...@@ -38,18 +38,22 @@ class PivotaltrackerService < Service ...@@ -38,18 +38,22 @@ class PivotaltrackerService < Service
def execute(push) def execute(push)
url = 'https://www.pivotaltracker.com/services/v5/source_commits' url = 'https://www.pivotaltracker.com/services/v5/source_commits'
push[:commits].each do |commit| push[:commits].each do |commit|
message = {'source_commit' => message = {
{'commit_id' => commit[:id], 'source_commit' => {
'commit_id' => commit[:id],
'author' => commit[:author][:name], 'author' => commit[:author][:name],
'url' => commit[:url], 'url' => commit[:url],
'message' => commit[:message]} 'message' => commit[:message]
} }
status = PivotaltrackerService.post(url, }
PivotaltrackerService.post(
url,
body: message.to_json, body: message.to_json,
headers: {'Content-Type' => 'application/json', headers: {
'X-TrackerToken' => token} 'Content-Type' => 'application/json',
'X-TrackerToken' => token
}
) )
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment