summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-03-02 21:58:20 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-03-02 21:58:20 +0800
commitc8909d47583e5517a3c22e6e88362ebe5879a02b (patch)
treee4c1b83a26970e9d7c697bfd2c50f12ca73a7e9d
parent9c3a8ff2994a34ff28484650aa400a0b167855f3 (diff)
downloadgitea-c8909d47583e5517a3c22e6e88362ebe5879a02b.tar.gz
gitea-c8909d47583e5517a3c22e6e88362ebe5879a02b.zip
add fork
-rw-r--r--models/repo.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go
index 70e2673d34..6fc590566e 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")
}