mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	add fork
This commit is contained in:
		@@ -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")
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user