From 5f08b81ccc1b6d1327407305eff06ff8f2e1587b Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Mon, 10 Jul 2023 07:07:17 +0200 Subject: [PATCH] [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) --- routers/private/actions.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routers/private/actions.go b/routers/private/actions.go index b7e416f56a..2403b9c41a 100644 --- a/routers/private/actions.go +++ b/routers/private/actions.go @@ -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)