Add option to pass a version message

This commit is contained in:
Stephen Paulger
2024-04-10 10:45:16 +01:00
committed by Manuel Rüger
parent b7cb1824ae
commit 9b91ee3344
2 changed files with 9 additions and 2 deletions

View File

@@ -503,7 +503,7 @@ func (api *API) CreatePage(
return request.Response.(*PageInfo), nil
}
func (api *API) UpdatePage(page *PageInfo, newContent string, minorEdit bool, newLabels []string, appearance string) error {
func (api *API) UpdatePage(page *PageInfo, newContent string, minorEdit bool, versionMessage string, newLabels []string, appearance string) error {
nextPageVersion := page.Version.Number + 1
oldAncestors := []map[string]interface{}{}
@@ -532,6 +532,7 @@ func (api *API) UpdatePage(page *PageInfo, newContent string, minorEdit bool, ne
"version": map[string]interface{}{
"number": nextPageVersion,
"minorEdit": minorEdit,
"message": versionMessage,
},
"ancestors": oldAncestors,
"body": map[string]interface{}{