Moves the publish script out of the scoped workflow into a file: the second half of MIL-004 task 6 (issue #69). The sync half merged in PR #74.
Changes
tools/publish_wiki.py: the 296 lines that were embedded in publish-wiki.yml, unchanged in behaviour and messages, with a docstring that lists its environment variables.
.gitea/scoped_workflows/publish-wiki.yml: 313 lines down to 42. Two checkouts: the repository that owns the wiki (for its wiki/) and TirSystem/github-action at main into shared-scripts; then python3 shared-scripts/tools/publish_wiki.py. Triggers, permissions, the TOKEN_FOR_GITEA_WIKI secret and the concurrency group are unchanged.
Tests (193 pass):
tests/workflow_source.py imports the script file; the publish tests are unchanged apart from the loader;
the old "needs nothing from tools" test is inverted: the workflow must check out the shared repository and run the file;
MIL-004 Go/No-Go criterion 5: a new test asserts that no workflow in the repository embeds Python, and another compiles every script under tools/.
README (Tests paragraph) no longer says "Python embedded in them".
Wiki pages changed (rule 8)
Home in English, Danish and Bahasa Malaysia (the Tests paragraph). The translations are drafts, not yet reviewed by a native reader (#36).
Verified live
From TirSystem-BashScript/RepoFoundry (another organization), on throwaway branches (deleted): the two-checkout workflow ran the script file and ended with No wiki/.publish marker in TirSystem-BashScript/RepoFoundry; wiki publishing is not enabled for this repository., which proves the consumer checkout, the shared-script checkout and the opt-in gate without writing to anyone's wiki.
After the merge
The merge touches wiki/Home*.md, so this repository's publisher runs on the new file; expected: Published 18 page(s) ...: 0 created, 3 updated, 0 deleted. The first real consumer runs of the sync script file are the daily runs at 03:17 UTC.
Moves the publish script out of the scoped workflow into a file: the second half of MIL-004 task 6 (issue #69). The sync half merged in PR #74.
## Changes
- `tools/publish_wiki.py`: the 296 lines that were embedded in `publish-wiki.yml`, unchanged in behaviour and messages, with a docstring that lists its environment variables.
- `.gitea/scoped_workflows/publish-wiki.yml`: 313 lines down to 42. Two checkouts: the repository that owns the wiki (for its `wiki/`) and `TirSystem/github-action` at `main` into `shared-scripts`; then `python3 shared-scripts/tools/publish_wiki.py`. Triggers, permissions, the `TOKEN_FOR_GITEA_WIKI` secret and the concurrency group are unchanged.
- Tests (193 pass):
- `tests/workflow_source.py` imports the script file; the publish tests are unchanged apart from the loader;
- the old "needs nothing from tools" test is inverted: the workflow must check out the shared repository and run the file;
- **MIL-004 Go/No-Go criterion 5:** a new test asserts that no workflow in the repository embeds Python, and another compiles every script under `tools/`.
- README (Tests paragraph) no longer says "Python embedded in them".
## Wiki pages changed (rule 8)
`Home` in English, Danish and Bahasa Malaysia (the Tests paragraph). The translations are drafts, not yet reviewed by a native reader (#36).
## Verified live
From `TirSystem-BashScript/RepoFoundry` (another organization), on throwaway branches (deleted): the two-checkout workflow ran the script file and ended with `No wiki/.publish marker in TirSystem-BashScript/RepoFoundry; wiki publishing is not enabled for this repository.`, which proves the consumer checkout, the shared-script checkout and the opt-in gate without writing to anyone's wiki.
## After the merge
The merge touches `wiki/Home*.md`, so this repository's publisher runs on the new file; expected: `Published 18 page(s) ...: 0 created, 3 updated, 0 deleted`. The first real consumer runs of the sync script file are the daily runs at 03:17 UTC.
Closes #69
tools/publish_wiki.py holds the 296 lines that were embedded in
publish-wiki.yml, unchanged in behaviour and messages. The scoped workflow
now checks out the repository that owns the wiki and TirSystem/github-action
at main, and runs the file (42 lines instead of 313). The tests import the
file, and a new test asserts that no workflow embeds Python. README and the
Home wiki page with its translations no longer mention embedded Python.
Verified live from TirSystem-BashScript/RepoFoundry.
Task: MIL-004#6
Tirsvad
merged commit aa18811003 into main2026-10-10 15:54:46 +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.
Moves the publish script out of the scoped workflow into a file: the second half of MIL-004 task 6 (issue #69). The sync half merged in PR #74.
Changes
tools/publish_wiki.py: the 296 lines that were embedded inpublish-wiki.yml, unchanged in behaviour and messages, with a docstring that lists its environment variables..gitea/scoped_workflows/publish-wiki.yml: 313 lines down to 42. Two checkouts: the repository that owns the wiki (for itswiki/) andTirSystem/github-actionatmainintoshared-scripts; thenpython3 shared-scripts/tools/publish_wiki.py. Triggers, permissions, theTOKEN_FOR_GITEA_WIKIsecret and the concurrency group are unchanged.tests/workflow_source.pyimports the script file; the publish tests are unchanged apart from the loader;tools/.Wiki pages changed (rule 8)
Homein English, Danish and Bahasa Malaysia (the Tests paragraph). The translations are drafts, not yet reviewed by a native reader (#36).Verified live
From
TirSystem-BashScript/RepoFoundry(another organization), on throwaway branches (deleted): the two-checkout workflow ran the script file and ended withNo wiki/.publish marker in TirSystem-BashScript/RepoFoundry; wiki publishing is not enabled for this repository., which proves the consumer checkout, the shared-script checkout and the opt-in gate without writing to anyone's wiki.After the merge
The merge touches
wiki/Home*.md, so this repository's publisher runs on the new file; expected:Published 18 page(s) ...: 0 created, 3 updated, 0 deleted. The first real consumer runs of the sync script file are the daily runs at 03:17 UTC.Closes #69