Fix missing commit in UI on job:started event
This commit is contained in:
parent
49f1c74a12
commit
b66e5a9bb3
|
@ -62,11 +62,18 @@ Travis.Store = DS.Store.extend
|
||||||
{ id: id, clientId: clientId }
|
{ id: id, clientId: clientId }
|
||||||
|
|
||||||
receive: (event, data) ->
|
receive: (event, data) ->
|
||||||
|
console.log event, data
|
||||||
[name, type] = event.split(':')
|
[name, type] = event.split(':')
|
||||||
|
|
||||||
mappings = @adapter.get('mappings')
|
mappings = @adapter.get('mappings')
|
||||||
type = mappings[name]
|
type = mappings[name]
|
||||||
|
|
||||||
|
# TODO: we should definitely handle such things in some kind of adapters
|
||||||
|
# when we get 'commit' value, ember thinks that this is actually a commit object
|
||||||
|
# that it should sideload, let's just delete it for now
|
||||||
|
if event == 'build:started' && data.build.commit
|
||||||
|
delete(data.build.commit)
|
||||||
|
|
||||||
if event == 'job:log'
|
if event == 'job:log'
|
||||||
if job = @find(Travis.Job, data['job']['id'])
|
if job = @find(Travis.Job, data['job']['id'])
|
||||||
job.appendLog(data['job']['_log'])
|
job.appendLog(data['job']['_log'])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user