I am trying the exact same thing with Gitea version 1.23.8. Can anyone else confirm if this defect still exists? Below is a Power Script that I wrote for testing this. It does return, but it never seems to set the external Wiki. I am trying to do this for an organization repository.
$Owner = “Test-Organization”
$Repo = “test-repo-wiki”
$Token = “<api_key>”
$GiteaUrl = “http://localhost:3000/api/v1”
$ExternalWikiUrl = “https://test.com/test”
$Body = @{
has_wiki = $false
external_wiki = @{
external_wiki_url = $ExternalWikiUrl
}
} | ConvertTo-Json -Depth 3
Invoke-RestMethod -Uri "$GiteaUrl/repos/$Owner/$Repo"
-Method Patch -Headers @{ Authorization = "token $Token" }
-ContentType “application/json” `
-Body $Body
Are there other settings that I need to make sure are set? What am I missing?