From bb919bdf4219af6bacb903a6749d13eda242ad30 Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Thu, 3 Oct 2013 16:24:21 +0200 Subject: [PATCH 1/3] update core --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 166f4bd1..9a418bf7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -23,7 +23,7 @@ GIT GIT remote: git://github.com/travis-ci/travis-core.git - revision: cae4cfbfbbc6c24354a9b4360d021a10f95f4e64 + revision: a5009d186ba37171bbdedf52c19a9e812f7f39da specs: travis-core (0.0.1) actionmailer (~> 3.2.12) @@ -52,7 +52,7 @@ GIT GIT remote: git://github.com/travis-ci/travis-support.git - revision: 7c69fe727968b31551ce3acbe0d4f2e0e5bc8fa3 + revision: fffb09b3e6967cdb6c33f04ac7f7840a8df77400 specs: travis-support (0.0.1) From 93277035cd7b0dc5190226081f21ae24c5773ba2 Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Thu, 3 Oct 2013 16:24:35 +0200 Subject: [PATCH 2/3] add repo endpoints for fetching branches --- lib/travis/api/app/endpoint/repos.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/travis/api/app/endpoint/repos.rb b/lib/travis/api/app/endpoint/repos.rb index 1d502abf..fd3bbd27 100644 --- a/lib/travis/api/app/endpoint/repos.rb +++ b/lib/travis/api/app/endpoint/repos.rb @@ -50,6 +50,16 @@ class Travis::Api::App respond_with service(:regenerate_repo_key, params), version: :v2 end + # Gets list of branches + get '/:id/branches' do + respond_with service(:find_branches, params), type: :branches, version: :v2 + end + + # Gets lastest build on a branch branches + get '/:id/branches/:branch' do + respond_with service(:find_branch, params), type: :branch, version: :v2 + end + # Gets the repository with the given name. # # ### Response @@ -101,6 +111,16 @@ class Travis::Api::App post '/:owner_name/:name/key' do respond_with service(:regenerate_repo_key, params), version: :v2 end + + # Gets list of branches + get '/:owner_name/:name/branches' do + respond_with service(:find_branches, params), type: :branches, version: :v2 + end + + # Gets lastest build on a branch branches + get '/:owner_name/:name/branches/:branch' do + respond_with service(:find_branch, params), type: :branch, version: :v2 + end end end end From 059e380e0b63e5bd7a933c9e2de1219d342c7356 Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Thu, 3 Oct 2013 16:36:29 +0200 Subject: [PATCH 3/3] update travis-core --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9a418bf7..1f4b1d5e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -23,7 +23,7 @@ GIT GIT remote: git://github.com/travis-ci/travis-core.git - revision: a5009d186ba37171bbdedf52c19a9e812f7f39da + revision: e46364c38f57ae08d66aa2e00b0e76104712e35c specs: travis-core (0.0.1) actionmailer (~> 3.2.12)