[GITEA] parseScope with owner/repo always sets owner to zero

(cherry picked from commit 5ad65cdd195b7c92a9cd2d4bcf30ba114486bc38)
(cherry picked from commit 1cc0aeb1ebbbd56fd5462278d0c2f93bdfb18af5)
(cherry picked from commit 88634c268930aaf16acf40ebb8139ef60c0e5afe)
This commit is contained in:
Earl Warren 2023-07-10 07:07:17 +02:00
parent 49f68518c2
commit 5f08b81ccc
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

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