From 26f3346fffe51cc9da9d08404ff2592d6451c252 Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Fri, 18 Feb 2022 10:26:11 -0500 Subject: [PATCH] gitsrht-update-hook: Use owner username instead of pusher username Use the owner username to authenticate to the GraphQL API instead of the pusher username. Fixes: https://todo.sr.ht/~sircmpwn/git.sr.ht/362 --- gitsrht-update-hook/post-update.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitsrht-update-hook/post-update.go b/gitsrht-update-hook/post-update.go index 4278e31..a9cd3be 100644 --- a/gitsrht-update-hook/post-update.go +++ b/gitsrht-update-hook/post-update.go @@ -218,7 +218,7 @@ func postUpdate() { logger.Fatalf("Failed to open a database connection: %v", err) } - dbinfo, err := fetchInfoForPush(db, context.User.Name, context.Repo.Id, context.Repo.Name, context.Repo.Visibility, newDescription, newVisibility) + dbinfo, err := fetchInfoForPush(db, context.Repo.OwnerName, context.Repo.Id, context.Repo.Name, context.Repo.Visibility, newDescription, newVisibility) if err != nil { logger.Fatalf("Failed to fetch info from database: %v", err) } -- 2.38.4