mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-08-01 09:46:01 +00:00
Add repository as a principal when updating via webhook.
Resolves: https://codeberg.org/git-pages/git-pages/issues/234
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user