fix(api): keep wiki page name when editing with an empty title (#40153)

Match `PATCH /repos/{owner}/{repo}/wiki/page/{pageName}` document "leave
empty to keep unchanged"

Fixes #39179

---------

Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
Gaurav Dubey
2026-11-03 16:20:39 +00:00
committed by GitHub
parent 5c68ba3e0a
commit f26a314636
3 changed files with 28 additions and 12 deletions

View File

@@ -43,7 +43,7 @@ type WikiPageMetaData struct {
// CreateWikiPageOptions form for creating wiki
type CreateWikiPageOptions struct {
// page title. leave empty to keep unchanged
Title string `json:"title" binding:"TrimSpace;Required"`
Title string `json:"title" binding:"TrimSpace"`
// content must be base64 encoded
ContentBase64 string `json:"content_base64"`
// optional commit message summarizing the change