1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 09:07:19 +00:00

Use a predictiable fork URL to allow forking repositories without providing a repo ID (#29519)

Close #29512

The "fork" URL:

* Before: `/repo/fork/{RepoID}`
* After: `/{OwnerName}/{RepoName}/fork`
This commit is contained in:
wxiaoguang
2024-03-01 20:52:30 +08:00
committed by GitHub
parent 2ca5daf07e
commit 194479a741
5 changed files with 8 additions and 30 deletions

View File

@ -112,7 +112,7 @@ func getRepository(ctx *context.Context, repoID int64) *repo_model.Repository {
}
func getForkRepository(ctx *context.Context) *repo_model.Repository {
forkRepo := getRepository(ctx, ctx.ParamsInt64(":repoid"))
forkRepo := ctx.Repo.Repository
if ctx.Written() {
return nil
}