forked from gitea/gitea
1
0
Fork 0

parseScope with owner/repo always sets owner to zero (#25987) (#25989)

Backport #25987 by @earl-warren

Refs: https://codeberg.org/forgejo/forgejo/pulls/1001

Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com>
This commit is contained in:
Giteabot 2023-07-19 10:57:17 -04:00 committed by GitHub
parent ee47face12
commit f81a612eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -77,9 +77,10 @@ func parseScope(ctx *context.PrivateContext, scope string) (ownerID, repoID int6
if err != nil {
return ownerID, repoID, err
}
ownerID = u.ID
if !found {
return u.ID, repoID, nil
return ownerID, repoID, nil
}
r, err := repo_model.GetRepositoryByName(u.ID, repoName)