Fix the repository url.

This commit is contained in:
takezoe
2013-06-16 03:20:34 +09:00
parent c3a4c36ac2
commit 676e6c6047
12 changed files with 48 additions and 40 deletions

View File

@@ -110,10 +110,10 @@ object JGitUtil {
/**
* Returns the repository information. It contains branch names and tag names.
*/
def getRepositoryInfo(owner: String, repository: String, servletContext: ServletContext): RepositoryInfo = {
def getRepositoryInfo(owner: String, repository: String, baseUrl: String): RepositoryInfo = {
withGit(getRepositoryDir(owner, repository)){ git =>
RepositoryInfo(
owner, repository, "http://localhost:8080%s/git/%s/%s.git".format(servletContext.getContextPath, owner, repository),
owner, repository, baseUrl + "/git/%s/%s.git".format(owner, repository),
// branches
git.branchList.call.asScala.map { ref =>
ref.getName.replaceFirst("^refs/heads/", "")