forked from forgejo/forgejo
Redirects for renamed repos (#807)
* Redirects for renamed repos * Remove unused phrase from locales
This commit is contained in:
parent
e86d935175
commit
027591a3a5
29 changed files with 127 additions and 27 deletions
|
@ -408,6 +408,22 @@ func (err ErrRepoAlreadyExist) Error() string {
|
|||
return fmt.Sprintf("repository already exists [uname: %s, name: %s]", err.Uname, err.Name)
|
||||
}
|
||||
|
||||
// ErrRepoRedirectNotExist represents a "RepoRedirectNotExist" kind of error.
|
||||
type ErrRepoRedirectNotExist struct {
|
||||
OwnerID int64
|
||||
RepoName string
|
||||
}
|
||||
|
||||
// IsErrRepoRedirectNotExist check if an error is an ErrRepoRedirectNotExist
|
||||
func IsErrRepoRedirectNotExist(err error) bool {
|
||||
_, ok := err.(ErrRepoRedirectNotExist)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (err ErrRepoRedirectNotExist) Error() string {
|
||||
return fmt.Sprintf("repository redirect does not exist [uid: %d, name: %s]", err.OwnerID, err.RepoName)
|
||||
}
|
||||
|
||||
// ErrInvalidCloneAddr represents a "InvalidCloneAddr" kind of error.
|
||||
type ErrInvalidCloneAddr struct {
|
||||
IsURLError bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue