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' => {
'author' => commit[:author][:name], 'commit_id' => commit[:id],
'url' => commit[:url], 'author' => commit[:author][:name],
'message' => commit[:message]} 'url' => commit[:url],
} 'message' => commit[:message]
status = PivotaltrackerService.post(url, }
body: message.to_json, }
headers: {'Content-Type' => 'application/json', PivotaltrackerService.post(
'X-TrackerToken' => token} url,
) body: message.to_json,
headers: {
'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