Makes the wiki publisher a scoped workflow with the opt-in gate decided in ADR-0004 (MIL-006 tasks 2 and 3, issues #57 and #58).
Changes
.gitea/scoped_workflows/publish-wiki.yml: the publish script is embedded (as in the metadata sync), so it needs nothing from tools/. Runs on push to main when wiki/** changes, and by dispatch; read-only permissions.
Removed: .gitea/workflows/publish-wiki.yml and tools/publish_wiki.py, so the workflow has one source.
wiki/.publish containing prune: this repository opts in, and its wiki must equal wiki/.
Behaviour:
no marker: the run ends successfully with one log line, no request, and the secret is not needed;
marker alone: pages are created and updated, others are kept and the log says how to remove them;
marker with prune: pages not in wiki/ are deleted;
any other marker content: refused before any request;
an empty wiki/ never deletes anything;
the secret is TOKEN_FOR_GITEA_WIKI of the organisation, with no fallback to TOKEN_FOR_GITEA; missing in an opted-in repository gives a configuration error.
Tests (144 pass): tests/test_publish_wiki.py runs the embedded script against a fake Gitea (opt-in, prune, no-prune, secret handling, error categories, token shape, workflow triggers and permissions); tests/workflow_source.py loads it.
Wiki pages changed (rule 8)
None.
Notes
Not yet verified on the instance: that the scoped workflow honours the paths: filter. If it does not, it runs in repositories without the marker and skips quickly. The pilot (issue #59) will confirm it.
Docs are stale until #60: the README and credentials guide still describe the TOKEN_FOR_GITEA fallback, which no longer applies. That is MIL-006 task 5 (issue #60), which also regenerates three wiki pages and their translations.
After this merges, ADR-0003 should be marked as superseded in part by ADR-0004 (RC-018 action item).
The first run on main publishes with prune, equal to today's behaviour.
Makes the wiki publisher a scoped workflow with the opt-in gate decided in ADR-0004 (MIL-006 tasks 2 and 3, issues #57 and #58).
## Changes
- `.gitea/scoped_workflows/publish-wiki.yml`: the publish script is embedded (as in the metadata sync), so it needs nothing from `tools/`. Runs on push to `main` when `wiki/**` changes, and by dispatch; read-only permissions.
- Removed: `.gitea/workflows/publish-wiki.yml` and `tools/publish_wiki.py`, so the workflow has one source.
- `wiki/.publish` containing `prune`: this repository opts in, and its wiki must equal `wiki/`.
- Behaviour:
- no marker: the run ends successfully with one log line, no request, and the secret is not needed;
- marker alone: pages are created and updated, others are kept and the log says how to remove them;
- marker with `prune`: pages not in `wiki/` are deleted;
- any other marker content: refused before any request;
- an empty `wiki/` never deletes anything;
- the secret is `TOKEN_FOR_GITEA_WIKI` of the organisation, with no fallback to `TOKEN_FOR_GITEA`; missing in an opted-in repository gives a configuration error.
- Tests (144 pass): `tests/test_publish_wiki.py` runs the embedded script against a fake Gitea (opt-in, prune, no-prune, secret handling, error categories, token shape, workflow triggers and permissions); `tests/workflow_source.py` loads it.
## Wiki pages changed (rule 8)
None.
## Notes
- **Not yet verified on the instance:** that the scoped workflow honours the `paths:` filter. If it does not, it runs in repositories without the marker and skips quickly. The pilot (issue #59) will confirm it.
- **Docs are stale until #60:** the README and credentials guide still describe the `TOKEN_FOR_GITEA` fallback, which no longer applies. That is MIL-006 task 5 (issue #60), which also regenerates three wiki pages and their translations.
- After this merges, ADR-0003 should be marked as superseded in part by ADR-0004 (RC-018 action item).
- The first run on `main` publishes with `prune`, equal to today's behaviour.
Closes #57
Closes #58
Embed the publish script in .gitea/scoped_workflows/publish-wiki.yml and
remove the repository workflow and tools/publish_wiki.py. A repository
publishes only when wiki/.publish exists; the word prune in it is the only
thing that lets the workflow delete pages. The organisation's
TOKEN_FOR_GITEA_WIKI is used with no fallback. This repository opts in with
prune. Tests run the embedded script against a fake Gitea.
Task: MIL-006#2
Task: MIL-006#3
Tirsvad
merged commit e530ecd99d into main2026-10-10 05:39:34 +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.
Makes the wiki publisher a scoped workflow with the opt-in gate decided in ADR-0004 (MIL-006 tasks 2 and 3, issues #57 and #58).
Changes
.gitea/scoped_workflows/publish-wiki.yml: the publish script is embedded (as in the metadata sync), so it needs nothing fromtools/. Runs on push tomainwhenwiki/**changes, and by dispatch; read-only permissions..gitea/workflows/publish-wiki.ymlandtools/publish_wiki.py, so the workflow has one source.wiki/.publishcontainingprune: this repository opts in, and its wiki must equalwiki/.prune: pages not inwiki/are deleted;wiki/never deletes anything;TOKEN_FOR_GITEA_WIKIof the organisation, with no fallback toTOKEN_FOR_GITEA; missing in an opted-in repository gives a configuration error.tests/test_publish_wiki.pyruns the embedded script against a fake Gitea (opt-in, prune, no-prune, secret handling, error categories, token shape, workflow triggers and permissions);tests/workflow_source.pyloads it.Wiki pages changed (rule 8)
None.
Notes
paths:filter. If it does not, it runs in repositories without the marker and skips quickly. The pilot (issue #59) will confirm it.TOKEN_FOR_GITEAfallback, which no longer applies. That is MIL-006 task 5 (issue #60), which also regenerates three wiki pages and their translations.mainpublishes withprune, equal to today's behaviour.Closes #57
Closes #58