fix branches after api cleanup
This commit is contained in:
parent
2e39139da3
commit
a5c3cf69f2
|
@ -7,15 +7,16 @@ BranchesController = Ember.Controller.extend
|
||||||
defaultBranch: (->
|
defaultBranch: (->
|
||||||
repos = @get('model')
|
repos = @get('model')
|
||||||
output = repos.filter (item, index) ->
|
output = repos.filter (item, index) ->
|
||||||
item if item.repository.default_branch['@href'] == item['@href']
|
item if item.default_branch == true
|
||||||
output[0]
|
if output.length
|
||||||
|
output[0]
|
||||||
).property('model')
|
).property('model')
|
||||||
|
|
||||||
activeBranches: (->
|
activeBranches: (->
|
||||||
repos = @get('model')
|
repos = @get('model')
|
||||||
repos = repos.filter (item, index) ->
|
repos = repos.filter (item, index) ->
|
||||||
item if item.exists_on_github == true && item.repository.default_branch['@href'] != item['@href']
|
item if item.exists_on_github == true && item.default_branch == false
|
||||||
.sortBy('last_build.finished_at')
|
.sortBy('default_branch.last_build.finished_at')
|
||||||
.reverse()
|
.reverse()
|
||||||
).property('model')
|
).property('model')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user