From 899e62a75db63af4496fdc0c8a521dd37021e4d2 Mon Sep 17 00:00:00 2001 From: miyuko Date: Mon, 27 Jul 2026 18:45:16 +0100 Subject: [PATCH] Add repository as a principal when updating via webhook. Resolves: https://codeberg.org/git-pages/git-pages/issues/234 --- src/pages.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages.go b/src/pages.go index 0e97078..6e4d3df 100644 --- a/src/pages.go +++ b/src/pages.go @@ -885,6 +885,9 @@ func postPage(w http.ResponseWriter, r *http.Request) error { ctx, cancel := context.WithTimeout(ctx, time.Duration(config.Limits.UpdateTimeout)) defer cancel() + principal := GetPrincipal(r.Context()) + principal.RepoUrl = &repoURL + result := UpdateFromRepository(ctx, webRoot, repoURL, auth.branch, UpdateOptions{}) resultChan <- result observeSiteUpdate("webhook", &result)