]> source.dussan.org Git - gitea.git/commitdiff
Set owner id to zero when GetRegistrationToken for repo (#31725) (#31729)
authorGiteabot <teabot@gitea.io>
Tue, 30 Jul 2024 01:57:43 +0000 (09:57 +0800)
committerGitHub <noreply@github.com>
Tue, 30 Jul 2024 01:57:43 +0000 (09:57 +0800)
Backport #31725 by @wolfogre

Fix #31707.

It's split from #31724.

Although #31724 could also fix #31707, it has change a lot so it's not a
good idea to backport it.

Co-authored-by: Jason Song <i@wolfogre.com>
routers/api/v1/repo/action.go

index 1fa383a30319e8ff0bb88b37686b4ba4c6294be9..a2c70521c1cde53325d6acaa1fa61ca068319644 100644 (file)
@@ -505,7 +505,7 @@ func (Action) GetRegistrationToken(ctx *context.APIContext) {
        //   "200":
        //     "$ref": "#/responses/RegistrationToken"
 
-       shared.GetRegistrationToken(ctx, ctx.Repo.Repository.OwnerID, ctx.Repo.Repository.ID)
+       shared.GetRegistrationToken(ctx, 0, ctx.Repo.Repository.ID)
 }
 
 var _ actions_service.API = new(Action)