Git LFS section is live with:

Enable LFS toggle — turns LFS on/off for the repo; all other controls dim when disabled
File locking toggle — enables the LFS locking protocol for binary assets
Maximum file size — optional per-file size cap in MB (blank = unlimited)
Info callout linking to the git-lfs client install page and noting the .gitattributes requirement
This commit is contained in:
2026-05-07 16:12:25 +02:00
parent 39eeccb314
commit 803672a610
7 changed files with 328 additions and 2 deletions
+3
View File
@@ -49,6 +49,7 @@ func New(cfg *config.Config, engine *xorm.Engine, store sessions.Store, staticFi
workflowH := handlers.NewWorkflowHandler(engine)
webhookH := handlers.NewWebhookHandler(engine)
prSettingsH := handlers.NewPRSettingsHandler(engine)
lfsH := handlers.NewLFSHandler(engine)
// ── Git smart-HTTP transport ───────────────────────────────────────────────
// These routes MUST be registered before the SPA catch-all and outside CSRF.
@@ -182,6 +183,8 @@ func New(cfg *config.Config, engine *xorm.Engine, store sessions.Store, staticFi
r.With(csrf).Put("/default-description", prSettingsH.UpdateDefaultDescription)
r.Get("/excluded-files", prSettingsH.GetExcludedFiles)
r.With(csrf).Put("/excluded-files", prSettingsH.UpdateExcludedFiles)
r.Get("/lfs-settings", lfsH.Get)
r.With(csrf).Put("/lfs-settings", lfsH.Update)
})
})
})