Fetch builds for branches from /builds endpoint (closes #123)
This commit is contained in:
parent
0e925c0eed
commit
e9092418a7
|
@ -70,6 +70,9 @@ require 'travis/model'
|
||||||
byRepoId: (id, parameters) ->
|
byRepoId: (id, parameters) ->
|
||||||
@find($.extend(parameters || {}, repository_id: id))
|
@find($.extend(parameters || {}, repository_id: id))
|
||||||
|
|
||||||
|
branches: (options) ->
|
||||||
|
@find repository_id: options.repoId, branches: true
|
||||||
|
|
||||||
olderThanNumber: (id, build_number) ->
|
olderThanNumber: (id, build_number) ->
|
||||||
# TODO fix this api and use some kind of pagination scheme
|
# TODO fix this api and use some kind of pagination scheme
|
||||||
@find(url: "/builds", repository_id: id, after_number: build_number)
|
@find(url: "/builds", repository_id: id, after_number: build_number)
|
||||||
|
|
|
@ -62,7 +62,7 @@ require 'travis/model'
|
||||||
).property()
|
).property()
|
||||||
|
|
||||||
branches: (->
|
branches: (->
|
||||||
Travis.Branch.byRepoId @get('id')
|
Travis.Build.branches repoId: @get('id')
|
||||||
).property()
|
).property()
|
||||||
|
|
||||||
events: (->
|
events: (->
|
||||||
|
|
Loading…
Reference in New Issue
Block a user