From 7b104f0cd03cf3df2b10f6f447857fe389654df1 Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Tue, 20 Feb 2018 04:50:42 -0800 Subject: Populate URL field of API commits (#3546) * Populate URL field of API commits * fix orgmode_test --- routers/api/v1/repo/branch.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'routers/api/v1/repo/branch.go') diff --git a/routers/api/v1/repo/branch.go b/routers/api/v1/repo/branch.go index a82527e6a7..8e44f42368 100644 --- a/routers/api/v1/repo/branch.go +++ b/routers/api/v1/repo/branch.go @@ -61,7 +61,7 @@ func GetBranch(ctx *context.APIContext) { return } - ctx.JSON(200, convert.ToBranch(branch, c)) + ctx.JSON(200, convert.ToBranch(ctx.Repo.Repository, branch, c)) } // ListBranches list all the branches of a repository @@ -98,7 +98,7 @@ func ListBranches(ctx *context.APIContext) { ctx.Error(500, "GetCommit", err) return } - apiBranches[i] = convert.ToBranch(branches[i], c) + apiBranches[i] = convert.ToBranch(ctx.Repo.Repository, branches[i], c) } ctx.JSON(200, &apiBranches) -- cgit v1.2.3