mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Remove GetRepositoryByRef and add GetRepositoryByOwnerAndName (#3043)
* remove GetRepositoryByRef and add GetRepositoryByOwnerAndName * fix tests * fix tests bug * some improvements
This commit is contained in:
		| @@ -572,9 +572,10 @@ func (err ErrLFSLockAlreadyExist) Error() string { | ||||
|  | ||||
| // ErrRepoNotExist represents a "RepoNotExist" kind of error. | ||||
| type ErrRepoNotExist struct { | ||||
| 	ID   int64 | ||||
| 	UID  int64 | ||||
| 	Name string | ||||
| 	ID        int64 | ||||
| 	UID       int64 | ||||
| 	OwnerName string | ||||
| 	Name      string | ||||
| } | ||||
|  | ||||
| // IsErrRepoNotExist checks if an error is a ErrRepoNotExist. | ||||
| @@ -584,7 +585,8 @@ func IsErrRepoNotExist(err error) bool { | ||||
| } | ||||
|  | ||||
| func (err ErrRepoNotExist) Error() string { | ||||
| 	return fmt.Sprintf("repository does not exist [id: %d, uid: %d, name: %s]", err.ID, err.UID, err.Name) | ||||
| 	return fmt.Sprintf("repository does not exist [id: %d, uid: %d, owner_name: %s, name: %s]", | ||||
| 		err.ID, err.UID, err.OwnerName, err.Name) | ||||
| } | ||||
|  | ||||
| // ErrRepoAlreadyExist represents a "RepoAlreadyExist" kind of error. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user