Fixes how the scoped publisher identifies wiki pages. Found while preparing the pilot (MIL-006 task 4, issue #59).
Problem
Gitea stores the title Home da as the page Home-da. The publisher compared title strings, so a file Home-da.md did not match the existing page Home da and the publisher would have tried to create a page that already exists. The pilot repository TirSystem/sqa-qc-checklists has 14 hand-written pages named with spaces, and my earlier tests used names without spaces, which is why they missed it.
a page is identified by the address Gitea reports (sub_url, percent-decoded), or by its title with spaces replaced by hyphens;
local file names are keyed the same way, so Home da.md and Home-da.md name one page;
two files that name the same page are refused with a configuration error, before any request.
tests/test_publish_wiki.py: 12 new offline tests (updates the existing page, identical pages are a no-op including _Sidebar, prune keeps a page that is in the folder under the other spelling, address wins over title and is decoded, collision refused). The new tests fail against the previous script (12 failures) and pass with the fix; full suite 156 passed.
Wiki pages changed (rule 8)
None.
Next in the pilot
Export the 14 existing pages byte for byte into wiki/ of sqa-qc-checklists with an empty wiki/.publish (no prune), so the first publish must report 0 created, 0 updated, 0 deleted.
Fixes how the scoped publisher identifies wiki pages. Found while preparing the pilot (MIL-006 task 4, issue #59).
## Problem
Gitea stores the title `Home da` as the page `Home-da`. The publisher compared title strings, so a file `Home-da.md` did not match the existing page `Home da` and the publisher would have tried to create a page that already exists. The pilot repository `TirSystem/sqa-qc-checklists` has 14 hand-written pages named with spaces, and my earlier tests used names without spaces, which is why they missed it.
## Changes
- `.gitea/scoped_workflows/publish-wiki.yml` (embedded script):
- a page is identified by the address Gitea reports (`sub_url`, percent-decoded), or by its title with spaces replaced by hyphens;
- local file names are keyed the same way, so `Home da.md` and `Home-da.md` name one page;
- two files that name the same page are refused with a configuration error, before any request.
- `tests/test_publish_wiki.py`: 12 new offline tests (updates the existing page, identical pages are a no-op including `_Sidebar`, prune keeps a page that is in the folder under the other spelling, address wins over title and is decoded, collision refused). The new tests fail against the previous script (12 failures) and pass with the fix; full suite 156 passed.
## Wiki pages changed (rule 8)
None.
## Next in the pilot
Export the 14 existing pages byte for byte into `wiki/` of `sqa-qc-checklists` with an empty `wiki/.publish` (no `prune`), so the first publish must report `0 created, 0 updated, 0 deleted`.
Refs #59
Gitea stores the title "Home da" as Home-da. The publisher compared title
strings, so a file named Home-da.md would have tried to create a page that
already exists. Identify a page by the address Gitea reports (sub_url),
treat a space and a hyphen as the same, and refuse two files that name one
page. Found while preparing the pilot in sqa-qc-checklists, whose wiki has
pages named with spaces.
Task: MIL-006#3
Tirsvad
merged commit e73975e3a6 into main2026-10-10 06:01:03 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes how the scoped publisher identifies wiki pages. Found while preparing the pilot (MIL-006 task 4, issue #59).
Problem
Gitea stores the title
Home daas the pageHome-da. The publisher compared title strings, so a fileHome-da.mddid not match the existing pageHome daand the publisher would have tried to create a page that already exists. The pilot repositoryTirSystem/sqa-qc-checklistshas 14 hand-written pages named with spaces, and my earlier tests used names without spaces, which is why they missed it.Changes
.gitea/scoped_workflows/publish-wiki.yml(embedded script):sub_url, percent-decoded), or by its title with spaces replaced by hyphens;Home da.mdandHome-da.mdname one page;tests/test_publish_wiki.py: 12 new offline tests (updates the existing page, identical pages are a no-op including_Sidebar, prune keeps a page that is in the folder under the other spelling, address wins over title and is decoded, collision refused). The new tests fail against the previous script (12 failures) and pass with the fix; full suite 156 passed.Wiki pages changed (rule 8)
None.
Next in the pilot
Export the 14 existing pages byte for byte into
wiki/ofsqa-qc-checklistswith an emptywiki/.publish(noprune), so the first publish must report0 created, 0 updated, 0 deleted.Refs #59