From c8909d47583e5517a3c22e6e88362ebe5879a02b Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 2 Mar 2014 21:58:20 +0800 Subject: [PATCH] add fork --- models/repo.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/models/repo.go b/models/repo.go index 70e2673d3..6fc590566 100644 --- a/models/repo.go +++ b/models/repo.go @@ -27,6 +27,13 @@ type Repo struct { Updated time.Time `xorm:"updated"` } +type Star struct { + Id int64 + RepoId int64 + UserId int64 + Created time.Time `xorm:"created"` +} + // check if repository is exist func IsRepositoryExist(user *User, reposName string) (bool, error) { repo := Repo{OwnerId: user.Id} @@ -121,6 +128,10 @@ func UnWatchRepository() { } +func ForkRepository(reposName string, userId int64) { + +} + func RepoPath(userName, repoName string) string { return filepath.Join(UserPath(userName), repoName+".git") }