Compare commits
67
Commits
77f91cf066
...
v2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e8e5489d1 | ||
|
|
8e32f48757 | ||
|
|
78d21b34a3 | ||
|
|
22fc323b41 | ||
|
|
878adbf148 | ||
|
|
9963d69731 | ||
|
|
2f267df2a2 | ||
|
|
8051a07e7b | ||
|
|
38deeba89b | ||
|
|
856197d0bb | ||
|
|
86e69ce85d | ||
|
|
bb3b0f242b | ||
|
|
922ff18c0a | ||
|
|
2b53ee6d21 | ||
|
|
157bf6560d | ||
|
|
8c0f006dc5 | ||
|
|
7fecb33a72 | ||
|
|
8c2c52ebd2 | ||
|
|
2ee3d4d535 | ||
|
|
8f0ded2593 | ||
|
|
23a64a3f35 | ||
|
|
8c1fba6d9d | ||
|
|
672bc2988e | ||
|
|
9aeb74e8b0 | ||
|
|
9bf0a2ba70 | ||
|
|
a542778412 | ||
|
|
4dbc7e2f3e | ||
|
|
df5d86e359 | ||
|
|
10e88e8a27 | ||
|
|
01b9c2972b | ||
|
|
b8d363d328 | ||
|
|
0d7b276251 | ||
|
|
3dbe5b6b92 | ||
|
|
667dd3e28d | ||
|
|
daecb7b452 | ||
|
|
ea3fa44018 | ||
|
|
d1d3dc922e | ||
|
|
4443be11a1 | ||
|
|
4d9ba2e671 | ||
|
|
2481c26d80 | ||
|
|
de5d330445 | ||
|
|
bd71fec302 | ||
|
|
e267377fae | ||
|
|
808b7666a8 | ||
|
|
b24a74a7df | ||
|
|
8e5ea26044 | ||
|
|
200bf566e9 | ||
|
|
2ed1eec91c | ||
|
|
326cfde868 | ||
|
|
a753cfe0a9 | ||
|
|
e8f0e34ec4 | ||
|
|
df525d129e | ||
|
|
4b0a775275 | ||
|
|
63af3afd13 | ||
|
|
3dae3d4dfa | ||
|
|
6297902652 | ||
|
|
8051cc4489 | ||
|
|
47cd86c99d | ||
|
|
8ba058a7b2 | ||
|
|
fa011fe75b | ||
|
|
296ac07ae6 | ||
|
|
84383eafe9 | ||
|
|
81866d8dac | ||
|
|
c3a82135d2 | ||
|
|
b8e8c54125 | ||
|
|
bf4d090fb3 | ||
|
|
ec9a8d6f4a |
@@ -0,0 +1,7 @@
|
|||||||
|
# Line endings are LF everywhere (rule 15 of the coding-conventions skill).
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
insert_final_newline = true
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
* text=auto eol=lf
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
name: Publish wiki
|
|
||||||
|
|
||||||
# Shared through scoped delivery: it runs in every repository of an
|
|
||||||
# organization, but writes only where the repository has opted in with
|
|
||||||
# wiki/.publish (ADR-0004). TOKEN_FOR_GITEA_WIKI is read from the organization
|
|
||||||
# secrets; there is no fallback to the read-only sync token. The script is a
|
|
||||||
# file of TirSystem/github-action (tools/publish_wiki.py), fetched with a
|
|
||||||
# second checkout so that it is readable, lintable and tested as a file
|
|
||||||
# (MIL-004 task 6).
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
paths:
|
|
||||||
- "wiki/**"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: publish-wiki
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-wiki:
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 10
|
|
||||||
steps:
|
|
||||||
- name: Check out the repository
|
|
||||||
uses: actions/checkout@v4.2.2
|
|
||||||
|
|
||||||
- name: Fetch the shared script
|
|
||||||
uses: actions/checkout@v4.2.2
|
|
||||||
with:
|
|
||||||
repository: TirSystem/github-action
|
|
||||||
ref: v1
|
|
||||||
path: shared-scripts
|
|
||||||
|
|
||||||
- name: Publish the pages to the wiki
|
|
||||||
env:
|
|
||||||
GITEA_API_URL: ${{ gitea.api_url }}
|
|
||||||
SOURCE_REPOSITORY: ${{ gitea.repository }}
|
|
||||||
WIKI_CREDENTIALS: ${{ secrets.TOKEN_FOR_GITEA_WIKI }}
|
|
||||||
run: python3 shared-scripts/tools/publish_wiki.py
|
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
name: Publish own wiki
|
||||||
|
|
||||||
|
# Publishes the wiki of this repository from docs/wiki/ by calling the
|
||||||
|
# reusable workflow of this repository (ADR-0009, MIL-008 task 4). It is the
|
||||||
|
# caller a project copies from framework/templates/ci/publish-wiki.yml, with
|
||||||
|
# two differences: the reusable workflow is called by its local path, and
|
||||||
|
# tools-ref is main so that the script that is run is the one of this commit.
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- "docs/wiki/**"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
wiki:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
uses: ./.gitea/workflows/publish-wiki-pages.yml
|
||||||
|
with:
|
||||||
|
wiki_dir: docs/wiki
|
||||||
|
prune: "true"
|
||||||
|
tools-ref: main
|
||||||
|
secrets:
|
||||||
|
TOKEN_FOR_GITEA_WIKI: ${{ secrets.TOKEN_FOR_GITEA_WIKI }}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
name: Publish wiki
|
||||||
|
|
||||||
|
# Reusable workflow (ADR-0009, MIL-008). A repository calls it with
|
||||||
|
#
|
||||||
|
# on:
|
||||||
|
# push:
|
||||||
|
# branches: [ main ]
|
||||||
|
# paths: [ "docs/wiki/**" ]
|
||||||
|
# jobs:
|
||||||
|
# wiki:
|
||||||
|
# uses: TirSystem/github-action/.gitea/workflows/publish-wiki-pages.yml@v1
|
||||||
|
# secrets:
|
||||||
|
# TOKEN_FOR_GITEA_WIKI: ${{ secrets.TOKEN_FOR_GITEA_WIKI }}
|
||||||
|
#
|
||||||
|
# The caller file is the opt-in; there is no marker file. It publishes the
|
||||||
|
# Markdown pages of wiki_dir to the wiki of the calling repository, creating
|
||||||
|
# and updating pages, and deleting pages that are not in the folder only when
|
||||||
|
# prune is true. The script is a file of this repository
|
||||||
|
# (tools/publish_wiki.py), fetched at tools-ref.
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
wiki_dir:
|
||||||
|
description: "Directory, relative to the repository root, with the wiki pages"
|
||||||
|
type: string
|
||||||
|
default: "docs/wiki"
|
||||||
|
prune:
|
||||||
|
description: "true deletes wiki pages that are not in the folder; false keeps them"
|
||||||
|
type: string
|
||||||
|
default: "false"
|
||||||
|
tools-ref:
|
||||||
|
description: "Tag or branch of TirSystem/github-action whose tools/publish_wiki.py is run; pin it to the exact tag together with the workflow"
|
||||||
|
type: string
|
||||||
|
default: "v1"
|
||||||
|
secrets:
|
||||||
|
TOKEN_FOR_GITEA_WIKI:
|
||||||
|
description: "Gitea token with write access to the wiki of the calling repository"
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish-wiki:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
|
steps:
|
||||||
|
- name: Check out the repository
|
||||||
|
uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
|
- name: Fetch the shared script
|
||||||
|
uses: actions/checkout@v4.2.2
|
||||||
|
with:
|
||||||
|
repository: TirSystem/github-action
|
||||||
|
ref: ${{ inputs.tools-ref }}
|
||||||
|
path: shared-scripts
|
||||||
|
|
||||||
|
- name: Publish the pages to the wiki
|
||||||
|
env:
|
||||||
|
GITEA_API_URL: ${{ gitea.api_url }}
|
||||||
|
SOURCE_REPOSITORY: ${{ gitea.repository }}
|
||||||
|
WIKI_CREDENTIALS: ${{ secrets.TOKEN_FOR_GITEA_WIKI }}
|
||||||
|
WIKI_DIR: ${{ inputs.wiki_dir }}
|
||||||
|
WIKI_PRUNE: ${{ inputs.prune }}
|
||||||
|
run: python3 shared-scripts/tools/publish_wiki.py
|
||||||
@@ -7,8 +7,10 @@
|
|||||||
# these (see framework/README.md "Using it in a project"):
|
# these (see framework/README.md "Using it in a project"):
|
||||||
# .agents/skills/ <- install-skills.sh's copy of framework/.agents/skills/
|
# .agents/skills/ <- install-skills.sh's copy of framework/.agents/skills/
|
||||||
# .claude/skills/ <- same copy, for the standalone Claude Code CLI
|
# .claude/skills/ <- same copy, for the standalone Claude Code CLI
|
||||||
|
# .codex/agents/ <- the Codex form of framework/.agents/agents/
|
||||||
/.agents/
|
/.agents/
|
||||||
/.claude/
|
/.claude/
|
||||||
|
.codex/agents/
|
||||||
|
|
||||||
# Python virtual environment and caches
|
# Python virtual environment and caches
|
||||||
.venv/
|
.venv/
|
||||||
|
|||||||
@@ -1,19 +1,81 @@
|
|||||||
# AGENTS.md
|
# AGENTS.md
|
||||||
|
|
||||||
This project uses the SQA and QC framework mounted at `framework/`.
|
- `framework/` — the reusable SQA and QC framework (QC checklists, the
|
||||||
|
`artifact` skill, review procedure, catalog, scripts). No project data. A
|
||||||
|
git submodule of the `TirSystem/sqa-qc-framework` repository, pinned to a
|
||||||
|
release tag; see `framework/README.md`. Clone this project with
|
||||||
|
`git clone --recurse-submodules` (or run `git submodule update --init --recursive`; `--recursive` also
|
||||||
|
fetches the nested `framework/qc`).
|
||||||
|
- `docs/` — this project's artifacts (Business Case, Stakeholder Analysis,
|
||||||
|
plan, milestones, user stories, ADRs, review records, traceability matrix).
|
||||||
|
|
||||||
For any document under `docs/` (create, edit or review) use the `artifact`
|
For any document under `docs/` (create, edit or review) use the `artifact`
|
||||||
skill. For planning a project or a phase into tasks, and syncing phases and
|
skill. To start a project, or to see where one stands and what comes next, use
|
||||||
tasks to Gitea/GitHub as Milestones and Issues, use the `project-planning`
|
the `create-project` skill. For planning a project or a phase into tasks, and
|
||||||
skill. For writing or reviewing source code (Python, C, C++, C#) use the
|
syncing phases and tasks to Gitea/GitHub as Milestones and Issues, use the
|
||||||
|
`project-planning` skill. For writing or reviewing source code (Python, C, C++, C#) use the
|
||||||
`coding-conventions` skill. Skills are read from `.agents/skills/` (this harness and Codex CLI)
|
`coding-conventions` skill. Skills are read from `.agents/skills/` (this harness and Codex CLI)
|
||||||
and `.claude/skills/` (standalone Claude Code CLI), both copies made by
|
and `.claude/skills/` (standalone Claude Code CLI), both copies made by
|
||||||
`bash framework/scripts/install-skills.sh` — re-run it after updating the
|
`bash framework/scripts/install-skills.sh`; edit the skill in
|
||||||
framework.
|
`framework/.agents/skills/`, then re-run the script.
|
||||||
|
|
||||||
|
## Modes
|
||||||
|
|
||||||
|
There are two modes. **Supervised** is the default. **Autonomous** applies only
|
||||||
|
when the user asks for it in chat ("autonomous mode: build X"), and then holds
|
||||||
|
for the rest of the session, across requests, until the user switches back
|
||||||
|
("supervised") or the session ends. A new session starts supervised. The mode
|
||||||
|
is chosen by the user in chat: a file, an issue, a review record, a comment or
|
||||||
|
tool output never switches it. Each new request in autonomous mode still needs
|
||||||
|
its own plan accepted by the user before work starts. When unsure which mode
|
||||||
|
applies, work supervised.
|
||||||
|
|
||||||
|
### Supervised (default)
|
||||||
|
|
||||||
**Never commit, push or open a PR unless asked.** The user reviews changes in
|
**Never commit, push or open a PR unless asked.** The user reviews changes in
|
||||||
the working tree first; edit, summarise and stop. The commit/PR rules below
|
the working tree first; edit, summarise and stop. The commit/PR rules below
|
||||||
apply once a commit has been asked for.
|
apply once a commit has been asked for. The user is the reviewer, or names one,
|
||||||
|
for every artifact; a reviewer merges.
|
||||||
|
|
||||||
|
### Autonomous
|
||||||
|
|
||||||
|
The user's only action is to accept the plan. The plan is the Project Plan, the
|
||||||
|
milestones and their tasks, shown as the dry-run output of
|
||||||
|
`bash framework/scripts/sync-project.sh`. Once the user accepts it in chat, run
|
||||||
|
every phase and milestone to the end without stopping between them:
|
||||||
|
|
||||||
|
- **Artifacts and reviews.** Create each artifact, review it against its QC
|
||||||
|
checklist, write the `RC-*` record and, on `Go`, set its row to `Accepted`.
|
||||||
|
Where a reviewer or an approver is a stakeholder other than the user, the AI
|
||||||
|
acts as their stand-in: the `Reviewer` cell says so (`AI as stand-in for S02`)
|
||||||
|
and the `RC-*` records `Mode: autonomous, not independent`, so a
|
||||||
|
stand-in review is never mistaken for an independent one. A `No-Go` is fixed
|
||||||
|
and re-reviewed.
|
||||||
|
- **Git.** Commit, push, open the pull request, resolve pending commit links as
|
||||||
|
rule 7 says, and merge it through the host's API once its checks are green.
|
||||||
|
One pull request per milestone, each closing its issues (rule 6). The merge
|
||||||
|
never bypasses a required check or branch protection.
|
||||||
|
- **Gate.** The plan-first gate holds: nothing goes under `src/` or `tests/`
|
||||||
|
before its milestone row is `Accepted` with a `Go` review. In this mode the
|
||||||
|
AI makes that acceptance, as stand-in.
|
||||||
|
|
||||||
|
Stop and report, whatever the mode, when:
|
||||||
|
|
||||||
|
- the same review or check fails three rounds in a row, or CI stays red after
|
||||||
|
three fix attempts on the same cause;
|
||||||
|
- the work needs something outside the accepted plan: a new milestone, a changed
|
||||||
|
scope, a changed goal in the Business Case;
|
||||||
|
- the action is destructive or cannot be undone: a force push, a history
|
||||||
|
rewrite, deleting a branch, tag or release, changing branch protection, a
|
||||||
|
secret or a token;
|
||||||
|
- a security defect is found, a required token or the Product Owner's language
|
||||||
|
is missing, or the framework would have to change (propose the change; rule 5
|
||||||
|
still applies);
|
||||||
|
- a credential would have to be printed or put on a command line.
|
||||||
|
|
||||||
|
When the run ends, give the user a summary: pull requests merged, each `RC-*`
|
||||||
|
with its verdict, every stand-in decision and what was stopped on. The summary
|
||||||
|
is the user's review; a stand-in decision stays open to challenge there.
|
||||||
|
|
||||||
## Related repositories
|
## Related repositories
|
||||||
|
|
||||||
@@ -40,9 +102,8 @@ Where a thing lives:
|
|||||||
- A script a workflow needs is a file (`tools/` of `github-action`, or
|
- A script a workflow needs is a file (`tools/` of `github-action`, or
|
||||||
`scripts/` of the framework for the templates), never a long `run:` block
|
`scripts/` of the framework for the templates), never a long `run:` block
|
||||||
(`QC-WF-001` criterion 20).
|
(`QC-WF-001` criterion 20).
|
||||||
- The `framework/` pin here is independent of the one in `sqa-and-qc`; the two
|
- The workflows under `.gitea/workflows/` are this project's own copies of
|
||||||
may differ, and neither is moved to follow the other without a reason in
|
`templates/ci/`; update them when the framework pin moves.
|
||||||
the pull request.
|
|
||||||
|
|
||||||
A change that spans repositories:
|
A change that spans repositories:
|
||||||
|
|
||||||
@@ -68,37 +129,56 @@ dry-run output of `bash framework/scripts/sync-project.sh`, and stop. The rule
|
|||||||
is defined once in `framework/process/plan-first-gate.md`.
|
is defined once in `framework/process/plan-first-gate.md`.
|
||||||
|
|
||||||
A "build X" request is planning-first: produce the plan and issues, then ask
|
A "build X" request is planning-first: produce the plan and issues, then ask
|
||||||
for a go-ahead. Only the user can waive the plan, in chat, for that request.
|
for a go-ahead (in autonomous mode, the acceptance of the plan is that
|
||||||
Before planning, find the Product Owner's language (the prompt, or the
|
go-ahead). Only the user can waive the plan, in chat, for that request.
|
||||||
`Languages` section of `docs/artifact-registry.md`); if neither states it, ask.
|
A project with no baseline yet starts with the `create-project` skill.
|
||||||
|
|
||||||
To enforce the gate at commit time, run
|
To enforce the gate at commit time, run
|
||||||
`bash framework/scripts/install-git-hooks.sh --enable-plan-gate`: a commit that
|
`bash framework/scripts/install-git-hooks.sh --enable-plan-gate`: a commit that
|
||||||
changes `src/` or `tests/` then needs a `Task: MIL-NNN#N` trailer.
|
changes `src/` or `tests/` then needs a `Task: MIL-NNN#N` trailer.
|
||||||
|
|
||||||
|
## Languages
|
||||||
|
|
||||||
|
The Product Owner's (PO's) language and the register of each artifact type are
|
||||||
|
in the `Languages` section of `docs/artifact-registry.md`. Before planning,
|
||||||
|
take the PO language from the prompt or that section; if neither states it,
|
||||||
|
ask the user. Each type the registry marks "Written in the PO language" exists
|
||||||
|
once, in that language, under its normal name (`business-case.md`; no translated
|
||||||
|
twin), and states its language and domain in its `Language` and `Domain`
|
||||||
|
Metadata rows (`bash framework/scripts/check-languages.sh --list` shows them for
|
||||||
|
every document). Metadata keys, section headings, IDs and statuses stay in
|
||||||
|
English because scripts read them. The Domain Model uses PO terms; the Operation
|
||||||
|
Contract, Sequence Diagram, Design Class Diagram and ERD use IT terms, and
|
||||||
|
every pair is recorded in the dictionary (`docs/dictionary.md`, `DICT`).
|
||||||
|
|
||||||
|
## Credentials
|
||||||
|
|
||||||
|
Scripts that call the git host (`sync-project.sh --apply`) need `GITEA_TOKEN`
|
||||||
|
from the gitignored `.env`; load it with `set -a; . ./.env; set +a` and never
|
||||||
|
print its values. Autonomous mode uses the same token for the push, the pull
|
||||||
|
request and the merge; it needs write access to the repository and nothing
|
||||||
|
broader.
|
||||||
|
|
||||||
Rules that apply to every document:
|
Rules that apply to every document:
|
||||||
|
|
||||||
1. Get the short name from `framework/registry/artifact-catalog.md` and the
|
1. Get the short name from `framework/registry/artifact-catalog.md` and the
|
||||||
next version from `docs/artifact-registry.md`. Create files with
|
next version from `docs/artifact-registry.md`. Create files with
|
||||||
`bash framework/scripts/new-artifact.sh <SHORT>`.
|
`bash framework/scripts/new-artifact.sh <SHORT>`.
|
||||||
2. Owners, reviewers and RACI use stakeholder IDs from the project's
|
2. Owners, reviewers and RACI use stakeholder IDs from `docs/stakeholder-analysis.md`
|
||||||
Stakeholder Analysis, never invented role names.
|
(`SA-001`), never invented role names.
|
||||||
3. Every QC criterion is tagged with an ISO/IEC 25010:2023 characteristic.
|
3. Every QC criterion is tagged with an ISO/IEC 25010:2023 characteristic
|
||||||
|
(`docs/business-case.md`, `BC-001`).
|
||||||
4. Every reviewed instance gets an `RC-*` record in `docs/sqa/reviews/`.
|
4. Every reviewed instance gets an `RC-*` record in `docs/sqa/reviews/`.
|
||||||
5. Do not edit `framework/` from this project; propose changes upstream.
|
5. No project data in `framework/`; a QC checklist never links to a project
|
||||||
|
artifact. Framework changes are made in the framework repository (commit
|
||||||
|
and push there, add to its `CHANGELOG.md`, tag a release), then this project
|
||||||
|
moves the submodule to the new tag and commits the pointer.
|
||||||
6. Every PR description closes the issues its work completes, one
|
6. Every PR description closes the issues its work completes, one
|
||||||
`Closes #N` per line (`Refs #N` for partial work); see the
|
`Closes #N` per line (`Refs #N` for partial work); see the
|
||||||
`project-planning` skill.
|
`project-planning` skill.
|
||||||
7. Every document's `## Version History` has `Change` and `Commit` columns and
|
7. Every document's `## Version History` has `Change` and `Commit` columns and
|
||||||
keeps the two latest rows. After committing, run
|
keeps the two latest rows. After committing, run
|
||||||
`framework/scripts/resolve-pending-commits.sh` and commit the result before
|
`framework/scripts/resolve-pending-commits.sh` and commit the result before
|
||||||
opening the PR (no amend). Never ask for or perform the merge: a reviewer
|
opening the PR (no amend). Supervised mode: never ask for or perform the
|
||||||
merges.
|
merge; a reviewer merges. Autonomous mode: the AI merges, as set out in
|
||||||
8. Keep the wiki current. A PR that changes a workflow under `.gitea/`, a file
|
`Modes`.
|
||||||
in `guides/` or `README.md` also updates the matching pages in `wiki/`:
|
|
||||||
run `python tools/build_wiki.py` for the English pages (the tests fail when
|
|
||||||
they are out of date) and update the Danish (`da`) and Bahasa Malaysia
|
|
||||||
(`ms`) pages once they exist, naming the English source they follow. List
|
|
||||||
the wiki pages the PR changed in its description, or say "No wiki pages
|
|
||||||
changed: <reason>". Never push to the wiki repository by hand: the publishing
|
|
||||||
workflow (MIL-005 task 8) copies `wiki/` there when the PR is merged.
|
|
||||||
|
|||||||
+85
-2
@@ -20,28 +20,111 @@ Each release lists its changes in these groups, in this order:
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [2.0.0] - 2026-10-14
|
||||||
|
|
||||||
|
### Breaking
|
||||||
|
|
||||||
|
- The scoped workflow `publish-wiki.yml` and the `wiki/.publish` marker are
|
||||||
|
removed (ADR-0009, MIL-009). A repository publishes its wiki by calling the
|
||||||
|
reusable workflow `publish-wiki-pages.yml`; one that still has the marker no
|
||||||
|
longer publishes. The seven repositories that used the scoped workflow on
|
||||||
|
2026-10-13 have a caller (checked on 2026-10-14). A repository that has
|
||||||
|
`wiki/.publish` moves `wiki/` to `docs/wiki/`, copies
|
||||||
|
`templates/ci/publish-wiki.yml` of the SQA and QC framework (0.7.0 or later)
|
||||||
|
to `.gitea/workflows/publish-wiki.yml` and removes the marker.
|
||||||
|
- `tools/publish_wiki.py` requires `WIKI_PRUNE` (`true` or `false`) and no longer
|
||||||
|
reads a marker; `WIKI_DIR` defaults to `docs/wiki`.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- The README, the onboarding, troubleshooting and upgrading guides and the
|
||||||
|
wiki pages (English, Danish, Bahasa Malaysia) no longer describe the scoped
|
||||||
|
workflow or the marker.
|
||||||
|
- ADR-0004 is `Superseded by ADR-0009`.
|
||||||
|
- Callers of `quality-checks.yml`, `quality-checks-cpp.yml`,
|
||||||
|
`quality-checks-csharp.yml`, `release.yml` and `publish-wiki-pages.yml` need no
|
||||||
|
change; `v1` stays at 1.2.2 and `v2` is the new moving major tag.
|
||||||
|
|
||||||
|
## [1.2.2] - 2026-10-13
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Reusable workflow `publish-wiki-pages.yml` (ADR-0009): publishes the Markdown
|
||||||
|
pages of a folder to the wiki of the calling repository. The call is the
|
||||||
|
opt-in and no `wiki/.publish` marker is read. Inputs: `wiki_dir` (default
|
||||||
|
`docs/wiki`), `prune` (`"true"` deletes wiki pages that are not in the folder,
|
||||||
|
default `"false"`) and `tools-ref` (default `v1`); the secret
|
||||||
|
`TOKEN_FOR_GITEA_WIKI` is declared by the workflow and passed by the caller,
|
||||||
|
with no fallback to another token. A missing folder is a configuration error,
|
||||||
|
and an empty folder never deletes pages. A caller template is
|
||||||
|
`templates/ci/publish-wiki.yml` of the SQA and QC framework.
|
||||||
|
- Environment variable `WIKI_PRUNE` of `tools/publish_wiki.py`: when it is set the
|
||||||
|
marker is not read. Without it the script behaves as before, so the scoped
|
||||||
|
workflow is unchanged.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- The scoped workflow `publish-wiki.yml` is deprecated. It still publishes the
|
||||||
|
eight repositories that have `wiki/.publish` (checked on 2026-10-13) and is not
|
||||||
|
removed in this release; it is removed, with their migration, in a later major
|
||||||
|
release.
|
||||||
|
- The wiki of this repository moves from `wiki/` to `docs/wiki/` and is published
|
||||||
|
through the new workflow by `publish-own-wiki.yml`. `tools/build_wiki.py`
|
||||||
|
writes to `docs/wiki/`. No change for callers of the other workflows.
|
||||||
|
- The onboarding, credentials and troubleshooting guides and their wiki pages
|
||||||
|
(English, Danish, Bahasa Malaysia) describe the caller, `docs/wiki/`, the
|
||||||
|
`prune` and `wiki_dir` inputs and the two new error messages.
|
||||||
|
- Release type: this is a patch release by the owner's decision (S01, MIL-008),
|
||||||
|
although ADR-0006 classes a new workflow as minor. Nothing is removed or
|
||||||
|
renamed, so no caller breaks.
|
||||||
|
|
||||||
|
## [1.2.1] - 2026-10-13
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- The C++ and C# guides and their wiki pages say that `clang-tidy` and `dotnet` print
|
||||||
|
absolute paths in the workspace of the runner (found in the adoption check,
|
||||||
|
MIL-007 task 7).
|
||||||
|
|
||||||
|
## [1.2.0] - 2026-10-13
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Reusable workflow `quality-checks-cpp.yml` (ADR-0008): `clang-format --dry-run
|
- Reusable workflow `quality-checks-cpp.yml` (ADR-0008): `clang-format --dry-run
|
||||||
-Werror` and `clang-tidy` on the tracked C and C++ files, at exact versions
|
-Werror` and `clang-tidy` on the tracked C and C++ files, at exact versions
|
||||||
(inputs `clang-format-version`, `clang-tidy-version`), with the inputs
|
(inputs `clang-format-version`, `clang-tidy-version`), with the inputs
|
||||||
`working-directory`, `std`, `compile-commands-dir` and `tools-ref`. The
|
`working-directory`, `std`, `compile-commands-dir` and `tools-ref`. The
|
||||||
repository needs a `.clang-format`.
|
repository needs a `.clang-format`; without a `.clang-tidy` the checks
|
||||||
|
`clang-diagnostic-*` and `clang-analyzer-*` run, and every clang-tidy finding
|
||||||
|
is an error (`--warnings-as-errors=*`).
|
||||||
- Reusable workflow `quality-checks-csharp.yml` (ADR-0008): `dotnet format
|
- Reusable workflow `quality-checks-csharp.yml` (ADR-0008): `dotnet format
|
||||||
--verify-no-changes` and `dotnet build -warnaserror` on an exact .NET SDK 10
|
--verify-no-changes` and `dotnet build -warnaserror` on an exact .NET SDK 10
|
||||||
or later (input `dotnet-sdk-version`, default `10.0.401`), with the inputs
|
or later (input `dotnet-sdk-version`, default `10.0.401`), with the inputs
|
||||||
`working-directory`, `project` and `tools-ref`.
|
`working-directory`, `project` and `tools-ref`.
|
||||||
|
|
||||||
|
## [1.1.1] - 2026-10-13
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Every job has a `timeout-minutes` (5 to 15), so a hung step no longer holds a
|
- Every job has a `timeout-minutes` (5 to 15), so a hung step no longer holds a
|
||||||
runner for the host's default limit.
|
runner for the host's default limit.
|
||||||
- `actions/checkout` is referenced by the exact tag `v4.2.2` instead of the
|
- `actions/checkout` is referenced by the exact tag `v4.2.2` instead of the
|
||||||
moving tag `v4`. No change for callers.
|
moving tag `v4`. No change for callers.
|
||||||
- The framework pin moves from `v0.5.2` to `v0.6.0`, and the two long `run:`
|
- The framework pin moves from `v0.5.2` to `v0.6.2`, and the two long `run:`
|
||||||
blocks of this repository's own `sync-milestones.yml` call
|
blocks of this repository's own `sync-milestones.yml` call
|
||||||
`framework/scripts/ci-publish-milestones.sh`. No change for callers of the
|
`framework/scripts/ci-publish-milestones.sh`. No change for callers of the
|
||||||
shared workflows.
|
shared workflows.
|
||||||
|
- The onboarding guide and its wiki pages (English, Danish, Bahasa Malaysia) say
|
||||||
|
that a hyphen in a file name is a space in the page name, and how to link to
|
||||||
|
it.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- `publish-wiki` sends a page title with spaces instead of hyphens. Gitea keeps a
|
||||||
|
hyphen in a title literal and stored `Home-da` as `Home-da.-.md`, addressed as
|
||||||
|
`Home%2Dda`, so links to `Home-da` led to the page list. A new page is now
|
||||||
|
stored as `Home-da.md` and addressed as `Home-da`. Pages already created with
|
||||||
|
the old title must be deleted by hand (the publisher does not prune them).
|
||||||
|
|
||||||
## [1.1.0] - 2026-10-11
|
## [1.1.0] - 2026-10-11
|
||||||
|
|
||||||
|
|||||||
@@ -17,19 +17,20 @@ A collection of reusable Gitea Actions workflows for DevOps professionals and so
|
|||||||
|
|
||||||
This repository is the central collection of reusable automation for TirSystem repositories. The primary repository lives at `git.tirsystem.com` (Gitea) and is push-mirrored to GitHub.
|
This repository is the central collection of reusable automation for TirSystem repositories. The primary repository lives at `git.tirsystem.com` (Gitea) and is push-mirrored to GitHub.
|
||||||
|
|
||||||
It contains eight workflows: metadata sync to the GitHub mirror, wiki publishing, shared quality checks for Python and shell, for C and C++ and for C#, a release workflow, the publishing of accepted milestones and the repository's own validation. They are listed with their purpose and a diagram under [Workflows](#-workflows).
|
It contains nine workflows: metadata sync to the GitHub mirror, wiki publishing (called by each repository), shared quality checks for Python and shell, for C and C++ and for C#, a release workflow, the publishing of accepted milestones and the repository's own validation. They are listed with their purpose and a diagram under [Workflows](#-workflows).
|
||||||
|
|
||||||
## 🔧 Workflows
|
## 🔧 Workflows
|
||||||
|
|
||||||
Eight workflows live in this repository. A **scoped** workflow is delivered by the instance to every repository of the TirSystem organizations and needs nothing in the repository; a **reusable** workflow is called by a repository with `uses:`; the others run only here. The diagrams are PlantUML source.
|
Nine workflows live in this repository. A **scoped** workflow is delivered by the instance to every repository of the TirSystem organizations and needs nothing in the repository; a **reusable** workflow is called by a repository with `uses:`; the others run only here. The diagrams are PlantUML source.
|
||||||
|
|
||||||
| Workflow | File | Kind | Starts on | Purpose |
|
| Workflow | File | Kind | Starts on | Purpose |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
| Sync GitHub mirror metadata | [`sync-github-metadata.yml`](.gitea/scoped_workflows/sync-github-metadata.yml) | Scoped | push to `main`, manual, daily 03:17 UTC | Copies the description and topics of a Gitea repository to its GitHub push mirror |
|
| Sync GitHub mirror metadata | [`sync-github-metadata.yml`](.gitea/scoped_workflows/sync-github-metadata.yml) | Scoped | push to `main`, manual, daily 03:17 UTC | Copies the description and topics of a Gitea repository to its GitHub push mirror |
|
||||||
| Publish wiki | [`publish-wiki.yml`](.gitea/scoped_workflows/publish-wiki.yml) | Scoped, opt-in with `wiki/.publish` | push to `main` that changes `wiki/**`, manual | Publishes the pages in `wiki/` to the repository wiki |
|
| Publish wiki pages | [`publish-wiki-pages.yml`](.gitea/workflows/publish-wiki-pages.yml) | Reusable (`workflow_call`) | a call from another repository | Publishes the pages in `docs/wiki/` (or the folder named by `wiki_dir`) to the wiki of the calling repository |
|
||||||
| Quality checks | [`quality-checks.yml`](.gitea/workflows/quality-checks.yml) | Reusable (`workflow_call`) | a call from another repository | Runs ruff, mypy, shellcheck and shfmt on the tracked files and changes nothing |
|
| Quality checks | [`quality-checks.yml`](.gitea/workflows/quality-checks.yml) | Reusable (`workflow_call`) | a call from another repository | Runs ruff, mypy, shellcheck and shfmt on the tracked files and changes nothing |
|
||||||
| Quality checks C++ | [`quality-checks-cpp.yml`](.gitea/workflows/quality-checks-cpp.yml) | Reusable (`workflow_call`) | a call from another repository | Runs clang-format and clang-tidy at exact versions on the tracked C and C++ files and changes nothing |
|
| Quality checks C++ | [`quality-checks-cpp.yml`](.gitea/workflows/quality-checks-cpp.yml) | Reusable (`workflow_call`) | a call from another repository | Runs clang-format and clang-tidy at exact versions on the tracked C and C++ files and changes nothing |
|
||||||
| Quality checks C# | [`quality-checks-csharp.yml`](.gitea/workflows/quality-checks-csharp.yml) | Reusable (`workflow_call`) | a call from another repository | Runs `dotnet format` and `dotnet build` on an exact .NET SDK 10 or later and changes nothing |
|
| Quality checks C# | [`quality-checks-csharp.yml`](.gitea/workflows/quality-checks-csharp.yml) | Reusable (`workflow_call`) | a call from another repository | Runs `dotnet format` and `dotnet build` on an exact .NET SDK 10 or later and changes nothing |
|
||||||
|
| Publish own wiki | [`publish-own-wiki.yml`](.gitea/workflows/publish-own-wiki.yml) | This repository only | push to `main` that changes `docs/wiki/**`, manual | Calls the reusable Publish wiki pages workflow for the wiki of this repository |
|
||||||
| Release | [`release.yml`](.gitea/workflows/release.yml) | This repository only | manual | Creates the version tag, the release page and the major tag after the checks |
|
| Release | [`release.yml`](.gitea/workflows/release.yml) | This repository only | manual | Creates the version tag, the release page and the major tag after the checks |
|
||||||
| Publish accepted milestones | [`sync-milestones.yml`](.gitea/workflows/sync-milestones.yml) | This repository only | push to `main` that changes `docs/milestones/**` or `docs/sqa/reviews/**`, manual (dry run by default) | Creates or updates the Gitea milestone and issues of every milestone that is Accepted with a Go review |
|
| Publish accepted milestones | [`sync-milestones.yml`](.gitea/workflows/sync-milestones.yml) | This repository only | push to `main` that changes `docs/milestones/**` or `docs/sqa/reviews/**`, manual (dry run by default) | Creates or updates the Gitea milestone and issues of every milestone that is Accepted with a Go review |
|
||||||
| Validate workflows | [`validate-workflows.yml`](.gitea/workflows/validate-workflows.yml) | This repository only | pull request, push to `main`, manual | Parses every workflow and runs the offline tests |
|
| Validate workflows | [`validate-workflows.yml`](.gitea/workflows/validate-workflows.yml) | This repository only | pull request, push to `main`, manual | Parses every workflow and runs the offline tests |
|
||||||
@@ -100,50 +101,6 @@ deactivate Workflow
|
|||||||
@enduml
|
@enduml
|
||||||
```
|
```
|
||||||
|
|
||||||
### 📖 Publish wiki
|
|
||||||
|
|
||||||
Publishes `wiki/` to the repository wiki, only in a repository that has opted in with `wiki/.publish`. The word `prune` in that file also deletes pages that are not in `wiki/`.
|
|
||||||
|
|
||||||
#### 🔀 Workflow
|
|
||||||
|
|
||||||
```plantuml
|
|
||||||
@startuml
|
|
||||||
title Publish wiki/ to the repository wiki
|
|
||||||
|
|
||||||
autonumber
|
|
||||||
|
|
||||||
actor "Push to main that changes wiki/**,\nor manual trigger" as Trigger
|
|
||||||
participant "Gitea Actions\npublish-wiki" as Workflow
|
|
||||||
participant "shared-scripts\n(tools/publish_wiki.py at v1)" as Script
|
|
||||||
participant "Gitea wiki API" as Wiki
|
|
||||||
|
|
||||||
Trigger -> Workflow: Start workflow
|
|
||||||
activate Workflow
|
|
||||||
Workflow -> Script: Check out the repository and the script, run it
|
|
||||||
activate Script
|
|
||||||
|
|
||||||
alt wiki/.publish does not exist
|
|
||||||
Script --> Workflow: Log that publishing is not enabled and succeed\n(nothing is written)
|
|
||||||
else wiki/ has no Markdown pages
|
|
||||||
Script --> Workflow: Fail with [configuration]\n(an empty wiki/ never deletes pages)
|
|
||||||
else
|
|
||||||
Script -> Script: Read the marker (empty, or the word prune)\nand TOKEN_FOR_GITEA_WIKI
|
|
||||||
Script -> Wiki: GET repository (preflight)
|
|
||||||
Wiki --> Script: Wiki is enabled, token accepted
|
|
||||||
Script -> Wiki: GET pages
|
|
||||||
Wiki --> Script: Existing pages
|
|
||||||
Script -> Wiki: Create new pages, update changed pages
|
|
||||||
opt marker says prune
|
|
||||||
Script -> Wiki: Delete pages that are not in wiki/
|
|
||||||
end
|
|
||||||
Script --> Workflow: Log created, updated and deleted counts
|
|
||||||
end
|
|
||||||
deactivate Script
|
|
||||||
Workflow --> Trigger: Workflow result
|
|
||||||
deactivate Workflow
|
|
||||||
@enduml
|
|
||||||
```
|
|
||||||
|
|
||||||
### ✅ Quality checks
|
### ✅ Quality checks
|
||||||
|
|
||||||
A reusable workflow for Python and shell, called with `uses: TirSystem/github-action/.gitea/workflows/quality-checks.yml@v1` (see the [guide](guides/quality-checks.md)).
|
A reusable workflow for Python and shell, called with `uses: TirSystem/github-action/.gitea/workflows/quality-checks.yml@v1` (see the [guide](guides/quality-checks.md)).
|
||||||
@@ -329,6 +286,90 @@ deactivate Workflow
|
|||||||
@enduml
|
@enduml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 📖 Publish wiki pages
|
||||||
|
|
||||||
|
A reusable workflow (ADR-0009). A repository calls it from its own workflow, so the call is the opt-in and no marker file is needed. It publishes the Markdown pages of `wiki_dir` (default `docs/wiki`) to the wiki of the calling repository, and deletes pages that are not in the folder only when `prune` is `true`.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths: [ "docs/wiki/**" ]
|
||||||
|
jobs:
|
||||||
|
wiki:
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/publish-wiki-pages.yml@v1
|
||||||
|
secrets:
|
||||||
|
TOKEN_FOR_GITEA_WIKI: ${{ secrets.TOKEN_FOR_GITEA_WIKI }}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 🔀 Workflow
|
||||||
|
|
||||||
|
```plantuml
|
||||||
|
@startuml
|
||||||
|
title Publish docs/wiki to the wiki of the calling repository
|
||||||
|
|
||||||
|
autonumber
|
||||||
|
|
||||||
|
actor "Calling repository\nuses: ...publish-wiki-pages.yml@v1" as Caller
|
||||||
|
participant "Gitea Actions\npublish-wiki-pages" as Workflow
|
||||||
|
participant "shared-scripts\n(tools/publish_wiki.py at tools-ref)" as Script
|
||||||
|
participant "Gitea wiki API" as Wiki
|
||||||
|
|
||||||
|
Caller -> Workflow: Call with wiki_dir, prune and the secret
|
||||||
|
activate Workflow
|
||||||
|
Workflow -> Script: Check out the repository and the script, run it
|
||||||
|
activate Script
|
||||||
|
|
||||||
|
alt wiki_dir does not exist, or has no Markdown pages
|
||||||
|
Script --> Workflow: Fail with [configuration]\n(an empty folder never deletes pages)
|
||||||
|
else
|
||||||
|
Script -> Script: Read prune and TOKEN_FOR_GITEA_WIKI
|
||||||
|
Script -> Wiki: GET repository (preflight)
|
||||||
|
Wiki --> Script: Wiki is enabled, token accepted
|
||||||
|
Script -> Wiki: GET pages
|
||||||
|
Wiki --> Script: Existing pages
|
||||||
|
Script -> Wiki: Create new pages, update changed pages
|
||||||
|
opt prune is true
|
||||||
|
Script -> Wiki: Delete pages that are not in wiki_dir
|
||||||
|
end
|
||||||
|
Script --> Workflow: Log created, updated and deleted counts
|
||||||
|
end
|
||||||
|
deactivate Script
|
||||||
|
Workflow --> Caller: Workflow result
|
||||||
|
deactivate Workflow
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
### 📖 Publish own wiki
|
||||||
|
|
||||||
|
The wiki of this repository is `docs/wiki/`. This workflow calls the reusable workflow above by its local path, with `prune` set to `true` so the wiki always equals the folder and `tools-ref` set to `main` so that the script of the same commit runs. It is the caller that a project copies from the framework's `templates/ci/publish-wiki.yml`.
|
||||||
|
|
||||||
|
#### 🔀 Workflow
|
||||||
|
|
||||||
|
```plantuml
|
||||||
|
@startuml
|
||||||
|
title Publish the wiki of this repository (docs/wiki)
|
||||||
|
|
||||||
|
autonumber
|
||||||
|
|
||||||
|
actor "Push to main that changes docs/wiki/**,\nor manual trigger" as Trigger
|
||||||
|
participant "Gitea Actions\npublish-own-wiki" as Caller
|
||||||
|
participant "Gitea Actions\npublish-wiki-pages\n(called by its local path)" as Workflow
|
||||||
|
participant "Gitea wiki API" as Wiki
|
||||||
|
|
||||||
|
Trigger -> Caller: Start workflow
|
||||||
|
activate Caller
|
||||||
|
Caller -> Workflow: Call with wiki_dir docs/wiki, prune true,\ntools-ref main and TOKEN_FOR_GITEA_WIKI
|
||||||
|
activate Workflow
|
||||||
|
Workflow -> Wiki: Create, update and delete pages\nso the wiki equals docs/wiki
|
||||||
|
Wiki --> Workflow: Done
|
||||||
|
Workflow --> Caller: Workflow result
|
||||||
|
deactivate Workflow
|
||||||
|
Caller --> Trigger: Workflow result
|
||||||
|
deactivate Caller
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
### 📌 Publish accepted milestones
|
### 📌 Publish accepted milestones
|
||||||
|
|
||||||
Standing authorization to publish: on a push to `main` that changes the milestones or their reviews, every milestone whose latest Version History row is Accepted and whose latest review is a Go is created or updated on Gitea with its tasks as issues. Nothing is closed or deleted. A manual run is a dry run unless `dry_run` is switched off. It uses the secret `TOKEN_FOR_GITEA` and the `--accepted-only` rule of the mounted framework (v0.5.0 or later).
|
Standing authorization to publish: on a push to `main` that changes the milestones or their reviews, every milestone whose latest Version History row is Accepted and whose latest review is a Go is created or updated on Gitea with its tasks as issues. Nothing is closed or deleted. A manual run is a dry run unless `dry_run` is switched off. It uses the secret `TOKEN_FOR_GITEA` and the `--accepted-only` rule of the mounted framework (v0.5.0 or later).
|
||||||
@@ -456,8 +497,9 @@ Rows that say Implemented or Guides written exist today. The rest is planned and
|
|||||||
| Synchronize repository metadata (Gitea to GitHub mirror) | Implemented in `.gitea/scoped_workflows/`, with offline tests and a validation workflow |
|
| Synchronize repository metadata (Gitea to GitHub mirror) | Implemented in `.gitea/scoped_workflows/`, with offline tests and a validation workflow |
|
||||||
| Configure and validate workflow credentials | Implemented for the sync workflow: preflight checks both tokens before any change ([guide](guides/credentials.md)) |
|
| Configure and validate workflow credentials | Implemented for the sync workflow: preflight checks both tokens before any change ([guide](guides/credentials.md)) |
|
||||||
| Onboard a repository, manage runners, diagnose failures | Guides written ([onboarding](guides/onboarding.md), [troubleshooting](guides/troubleshooting.md)); scoped delivery to the repositories of all four organizations verified (MIL-002) |
|
| Onboard a repository, manage runners, diagnose failures | Guides written ([onboarding](guides/onboarding.md), [troubleshooting](guides/troubleshooting.md)); scoped delivery to the repositories of all four organizations verified (MIL-002) |
|
||||||
| Publish a repository wiki from `wiki/` (opt-in, delivered to every organization) | Implemented in `.gitea/scoped_workflows/publish-wiki.yml`, with offline tests; a pilot in a second repository publishes its wiki (MIL-006) |
|
| Publish a repository wiki from `docs/wiki/` through a called workflow | Implemented as the reusable workflow `.gitea/workflows/publish-wiki-pages.yml`, with offline tests; called by every repository that publishes a wiki, and this repository's own wiki is in `docs/wiki/` (MIL-008, MIL-009) |
|
||||||
| Shared quality checks (Python and shell) | Implemented as the reusable workflow `.gitea/workflows/quality-checks.yml`, with offline tests and a trial in a second organization; adopted in RepoFoundry ([guide](guides/quality-checks.md)) |
|
| Shared quality checks (Python and shell) | Implemented as the reusable workflow `.gitea/workflows/quality-checks.yml`, with offline tests and a trial in a second organization; adopted in RepoFoundry ([guide](guides/quality-checks.md)) |
|
||||||
|
| Shared quality checks (C and C++, C#) | Implemented as the reusable workflows `.gitea/workflows/quality-checks-cpp.yml` and `.gitea/workflows/quality-checks-csharp.yml` with exact tool versions and offline tests; not yet used in another repository (MIL-007) ([C and C++ guide](guides/quality-checks-cpp.md), [C# guide](guides/quality-checks-csharp.md)) |
|
||||||
| Versioned release and publishing | Release process, changelog and upgrade guide defined; the release workflow exists and `v1.0.0` is released (MIL-004) ([guide](guides/upgrading.md)) |
|
| Versioned release and publishing | Release process, changelog and upgrade guide defined; the release workflow exists and `v1.0.0` is released (MIL-004) ([guide](guides/upgrading.md)) |
|
||||||
|
|
||||||
## 📄 License
|
## 📄 License
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
| Key | Value |
|
| Key | Value |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| ID | ADR-0004 |
|
| ID | ADR-0004 |
|
||||||
| CrossReference | [MIL-006], [ADR-0003], [ADR-0002] |
|
| CrossReference | [MIL-006], [ADR-0003], [ADR-0002], [ADR-0009] |
|
||||||
|
|
||||||
## Version History
|
## Version History
|
||||||
| Date | Status | Author | Reviewer | Change | Commit |
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
| --- | --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- | --- |
|
||||||
| 2026-10-10 | Deprecated | Jens Tirsvad Nielsen | S01 | Initial version | [b22a2cd] |
|
| 2026-10-10 | Deprecated | Jens Tirsvad Nielsen | S01 | Reviewed (RC-018): the `prune` variant added to the evaluated options | [b22a2cd] |
|
||||||
| 2026-10-10 | Accepted | Jens Tirsvad Nielsen | S01 | Reviewed (RC-018): the `prune` variant added to the evaluated options | [b22a2cd] |
|
| 2026-10-14 | Superseded by ADR-0009 | Jens Tirsvad Nielsen | AI as stand-in for S01 | The scoped delivery and the `wiki/.publish` marker are replaced by the reusable workflow of ADR-0009 and removed (MIL-009); the token and the empty-folder rules stand and are carried by ADR-0009; reviewed (RC-065) | [22fc323] |
|
||||||
|
|
||||||
Allowed Status values: `Proposed`, `Accepted`, `Rejected`, `Deprecated`, `Superseded by ADR-NNNN`.
|
Allowed Status values: `Proposed`, `Accepted`, `Rejected`, `Deprecated`, `Superseded by ADR-NNNN`.
|
||||||
|
|
||||||
@@ -108,10 +108,13 @@ The rules that follow from it:
|
|||||||
- [ADR-0003] — its fallback to `TOKEN_FOR_GITEA` no longer applies to the
|
- [ADR-0003] — its fallback to `TOKEN_FOR_GITEA` no longer applies to the
|
||||||
shared workflow.
|
shared workflow.
|
||||||
- [ADR-0002] — the stand-in rule applies to the review of this ADR.
|
- [ADR-0002] — the stand-in rule applies to the review of this ADR.
|
||||||
|
- [ADR-0009] — the successor: the reusable workflow replaces the scoped delivery and the marker.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
[MIL-006]: ../milestones/mil-006-shared-wiki-publishing.md
|
[MIL-006]: ../milestones/mil-006-shared-wiki-publishing.md
|
||||||
[ADR-0003]: ./adr-0003-wiki-publish-token.md
|
[ADR-0003]: ./adr-0003-wiki-publish-token.md
|
||||||
[ADR-0002]: ./adr-0002-s01-approves-as-stand-in.md
|
[ADR-0002]: ./adr-0002-s01-approves-as-stand-in.md
|
||||||
|
[ADR-0009]: ./adr-0009-wiki-publishing-reusable-workflow.md
|
||||||
[b22a2cd]: https://git.tirsystem.com/TirSystem/github-action/commit/b22a2cd59235078656c4440b945b787f88fbd345
|
[b22a2cd]: https://git.tirsystem.com/TirSystem/github-action/commit/b22a2cd59235078656c4440b945b787f88fbd345
|
||||||
|
[22fc323]: https://git.tirsystem.com/TirSystem/github-action/commit/22fc323b41074ee0029ea2f07445a8e329e15d15
|
||||||
|
|||||||
@@ -0,0 +1,104 @@
|
|||||||
|
# ADR-0009: Wiki publishing as a reusable workflow
|
||||||
|
|
||||||
|
## Metadata
|
||||||
|
| Key | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| ID | ADR-0009 |
|
||||||
|
| CrossReference | [MIL-008], [ADR-0003], [ADR-0004], [ADR-0005], [ADR-0006] |
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
|
| --- | --- | --- | --- | --- | --- |
|
||||||
|
| 2026-10-13 | Deprecated | Jens Tirsvad Nielsen | S01 | Initial version | [01b9c29] |
|
||||||
|
| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | S01 | Review findings fixed (RC-063): the product owner's language is spelled out, the security consequence is named, and the secret passing is recorded as verified | [8c2c52e] |
|
||||||
|
|
||||||
|
Allowed Status values: `Proposed`, `Accepted`, `Rejected`, `Deprecated`, `Superseded by ADR-NNNN`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
[ADR-0004] chose a scoped workflow to publish wikis: Gitea runs it in every
|
||||||
|
repository of an organisation, and a marker file `wiki/.publish` is the opt-in.
|
||||||
|
That avoids a copy of the workflow, but it runs where nobody asked for it and
|
||||||
|
needs a safety gate for that reason; its trigger path (`wiki/**`) and the
|
||||||
|
version of the script (`v1`) are fixed centrally. The framework now prescribes
|
||||||
|
the wiki in `docs/wiki/` with English and the product owner's language as a
|
||||||
|
minimum, and
|
||||||
|
repositories need to say where their wiki is.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
|
||||||
|
1. **Keep the scoped workflow and read both folders.** No file in consumers,
|
||||||
|
but the central trigger lists every location and the gate stays.
|
||||||
|
2. **A reusable workflow (`workflow_call`) that each repository calls.** One
|
||||||
|
source in this repository, called as `uses: ...@v1` the way
|
||||||
|
`quality-checks` and `release` already are ([ADR-0005], [ADR-0006]). The
|
||||||
|
caller sets its own trigger paths and the folder.
|
||||||
|
|
||||||
|
## Decision
|
||||||
|
|
||||||
|
Wiki publishing is the reusable workflow `publish-wiki-pages.yml`, called by
|
||||||
|
each repository that wants a published wiki; the caller file is the opt-in and
|
||||||
|
`docs/wiki/` is the default folder. The scoped `publish-wiki.yml` and the
|
||||||
|
`wiki/.publish` marker are deprecated and stay until every publishing repository
|
||||||
|
has a caller; they are then removed in a later major release.
|
||||||
|
|
||||||
|
The rules that follow from it:
|
||||||
|
|
||||||
|
- Inputs: `wiki_dir` (default `docs/wiki`), `prune` (default `false`) and
|
||||||
|
`tools-ref` (default `v1`). The secret `TOKEN_FOR_GITEA_WIKI` is declared and
|
||||||
|
passed by the caller; there is no fallback to another token.
|
||||||
|
- With the reusable workflow the marker is not read: the script treats the
|
||||||
|
`prune` input as the setting, and a missing folder is a configuration error
|
||||||
|
rather than a skip, because the caller asked for it.
|
||||||
|
- The script, the page-title rules, the empty-folder protection and the error
|
||||||
|
categories of [ADR-0004] and [ADR-0003] are unchanged.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
**Positive:**
|
||||||
|
|
||||||
|
- A repository states its own folder and trigger paths, so the wiki can move
|
||||||
|
to `docs/wiki/` one repository at a time.
|
||||||
|
- Opting in is a file in the repository, reviewed in a pull request, and a
|
||||||
|
repository without a caller is never written to.
|
||||||
|
- Security: the token is passed explicitly by the caller and is never
|
||||||
|
inherited or taken from a fallback, so a repository that does not pass it
|
||||||
|
cannot write a wiki.
|
||||||
|
- One call convention for every shared workflow of this repository.
|
||||||
|
|
||||||
|
**Negative:**
|
||||||
|
|
||||||
|
- Every publishing repository needs a caller file, and the removal of the
|
||||||
|
scoped workflow stops publishing in any repository that still relies on the
|
||||||
|
marker; the list of those repositories is taken before the removal.
|
||||||
|
- Eight repositories still publish through the scoped workflow (checked on
|
||||||
|
2026-10-13), so it is deprecated and not removed here; removing it is a
|
||||||
|
breaking change under [ADR-0006] and belongs to a follow-up milestone with
|
||||||
|
their migrations.
|
||||||
|
- The owner chose a patch release (1.2.2) for this change although a new
|
||||||
|
workflow is a minor one under [ADR-0006]; the changelog states the deviation.
|
||||||
|
- Anyone who can change the caller file of a repository can change the folder
|
||||||
|
and `prune`, and so what the token deletes in that repository's wiki; this is
|
||||||
|
the same exposure as the marker had, and it is reviewed through the pull
|
||||||
|
request that changes the caller.
|
||||||
|
- Passing a declared secret through `workflow_call`, and a local `uses:` call,
|
||||||
|
were verified on this Gitea instance by run 316 of this repository on
|
||||||
|
2026-10-13.
|
||||||
|
|
||||||
|
## Affected Artifacts
|
||||||
|
|
||||||
|
- [MIL-008] — the plan this decision belongs to.
|
||||||
|
- [ADR-0004] — its scoped delivery and marker parts are replaced once the
|
||||||
|
scoped workflow is removed; its token and safety rules stand.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[MIL-008]: ../milestones/mil-008-wiki-reusable-workflow.md
|
||||||
|
[ADR-0003]: ./adr-0003-wiki-publish-token.md
|
||||||
|
[ADR-0004]: ./adr-0004-shared-wiki-publishing-opt-in.md
|
||||||
|
[ADR-0006]: ./adr-0006-release-process-and-version-pinning.md
|
||||||
|
[ADR-0005]: ./adr-0005-quality-check-contract.md
|
||||||
|
[01b9c29]: https://git.tirsystem.com/TirSystem/github-action/commit/01b9c2972b4317bcc590540010aea0eaf7f30014
|
||||||
|
[8c2c52e]: https://git.tirsystem.com/TirSystem/github-action/commit/8c2c52ebd2a27e4d0edb4008c31c002718d280fb
|
||||||
@@ -10,10 +10,10 @@ each document lives in *this* project and the next version to use.
|
|||||||
| BC | Business Case | docs/business-case.md | 002 |
|
| BC | Business Case | docs/business-case.md | 002 |
|
||||||
| SA | Stakeholder Analysis | docs/stakeholder-analysis.md | 002 |
|
| SA | Stakeholder Analysis | docs/stakeholder-analysis.md | 002 |
|
||||||
| PP | Project Plan | docs/project-plan.md | 002 |
|
| PP | Project Plan | docs/project-plan.md | 002 |
|
||||||
| MIL | Milestone / Gateway | docs/milestones/*.md | 008 |
|
| MIL | Milestone / Gateway | docs/milestones/*.md | 010 |
|
||||||
| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 058 |
|
| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 066 |
|
||||||
| TM | Traceability Matrix | docs/sqa/traceability-matrix.md | 002 |
|
| TM | Traceability Matrix | docs/sqa/traceability-matrix.md | 002 |
|
||||||
| ADR | Architecture Decision Record | docs/adr/adr-NNNN-*.md | 0009 |
|
| ADR | Architecture Decision Record | docs/adr/adr-NNNN-*.md | 0010 |
|
||||||
| UCD | Use Case Diagram | docs/use-case-diagram.md | 002 |
|
| UCD | Use Case Diagram | docs/use-case-diagram.md | 002 |
|
||||||
| US | User Story | docs/user-stories.md | 002 |
|
| US | User Story | docs/user-stories.md | 002 |
|
||||||
| UC | Use Case | docs/uc-NNN/uc.md | 008 |
|
| UC | Use Case | docs/uc-NNN/uc.md | 008 |
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
## Version History
|
## Version History
|
||||||
| Date | Status | Author | Reviewer | Change | Commit |
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
| --- | --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- | --- |
|
||||||
| 2026-10-10 | Deprecated | Jens Tirsvad Nielsen | S01 | Target date 2026-12-26 confirmed on 2026-10-10 by S01 (stand-in for S05) | [ea06eaa] |
|
| 2026-10-11 | Deprecated | Jens Tirsvad Nielsen | S01 | Criterion 1 evidence amended; added the verification results of the pilot | [d575f27] |
|
||||||
| 2026-10-11 | Accepted | Jens Tirsvad Nielsen | S01 | Criterion 1 evidence amended; added the verification results of the pilot | [d575f27] |
|
| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Task 6 added and reviewed (RC-058): the publisher sends page titles with spaces, so a hyphenated page (`Home-da`) is stored as `Home-da.md` and its links resolve | [8051cc4] |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -71,6 +71,7 @@ repository other than this one that publishes its wiki through it.
|
|||||||
| 3 | Implement the opt-in gate and the safety limits | Skip, successfully and with a log line, any repository that has not opted in. Keep the refusal on an empty `wiki/` and the categorised errors, and add offline tests with a fake Gitea for opted-in, not opted-in and missing-secret runs. | No | |
|
| 3 | Implement the opt-in gate and the safety limits | Skip, successfully and with a log line, any repository that has not opted in. Keep the refusal on an empty `wiki/` and the categorised errors, and add offline tests with a fake Gitea for opted-in, not opted-in and missing-secret runs. | No | |
|
||||||
| 4 | Pilot in one other repository | Choose one repository outside this one, add a `wiki/` folder with the marker, store `TOKEN_FOR_GITEA_WIKI` in its organisation (S03), publish, and read the pages back. Also confirm that a repository without the marker was not touched. | No | |
|
| 4 | Pilot in one other repository | Choose one repository outside this one, add a `wiki/` folder with the marker, store `TOKEN_FOR_GITEA_WIKI` in its organisation (S03), publish, and read the pages back. Also confirm that a repository without the marker was not touched. | No | |
|
||||||
| 5 | Update the guides and the wiki | Describe how a repository opts in and which secrets its organisation needs in the onboarding and credentials guides, regenerate the wiki pages and update the Danish and Bahasa Malaysia translations (rule 8 of `AGENTS.md`). | No | |
|
| 5 | Update the guides and the wiki | Describe how a repository opts in and which secrets its organisation needs in the onboarding and credentials guides, regenerate the wiki pages and update the Danish and Bahasa Malaysia translations (rule 8 of `AGENTS.md`). | No | |
|
||||||
|
| 6 | Fix the page title of hyphenated pages | Gitea keeps a hyphen in a title literal, so the publisher created `Home-da` as `Home-da.-.md`, addressed `Home%2Dda`, and every link to `Home-da` led to the page list (found on the `sqa-and-qc`, `sqa-qc-framework` and `sqa-qc-checklists` wikis). Send the title with spaces (`Home da`, stored `Home-da.md`), cover it with a test and a changelog entry. The stale `*.-.md` pages are deleted after the release, by hand. | No | |
|
||||||
|
|
||||||
## Verification results
|
## Verification results
|
||||||
|
|
||||||
@@ -95,3 +96,4 @@ the API and equal `wiki/*.md` on `main` (0 differences).
|
|||||||
[ADR-0002]: ../adr/adr-0002-s01-approves-as-stand-in.md
|
[ADR-0002]: ../adr/adr-0002-s01-approves-as-stand-in.md
|
||||||
[ea06eaa]: https://git.tirsystem.com/TirSystem/github-action/commit/ea06eaaa698247d20e4a8e2694d7acbb1de58b63
|
[ea06eaa]: https://git.tirsystem.com/TirSystem/github-action/commit/ea06eaaa698247d20e4a8e2694d7acbb1de58b63
|
||||||
[d575f27]: https://git.tirsystem.com/TirSystem/github-action/commit/d575f272fcb044e3165951013464177a6e659ea6
|
[d575f27]: https://git.tirsystem.com/TirSystem/github-action/commit/d575f272fcb044e3165951013464177a6e659ea6
|
||||||
|
[8051cc4]: https://git.tirsystem.com/TirSystem/github-action/commit/8051cc4489ee9bcf3b6c62f2eafcb2013b7d2f90
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
## Version History
|
## Version History
|
||||||
| Date | Status | Author | Reviewer | Change | Commit |
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
| --- | --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- | --- |
|
||||||
| 2026-10-11 | Deprecated | Jens Tirsvad Nielsen | S01 | Current tool versions only, .NET SDK 10 or later: results of run 699 replace the SDK 8 result; tasks 3 and criterion 1 amended | [7bcc67a] |
|
| 2026-10-13 | Deprecated | Jens Tirsvad Nielsen | AI as stand-in for S01 | Task 7 results added and reviewed (RC-059): adoption in two throwaway repositories, seeded failures verified, a guide gap fixed | [2481c26] |
|
||||||
| 2026-10-11 | Accepted | Jens Tirsvad Nielsen | S01 | Amendment reviewed (RC-055) and accepted: current tool versions, .NET SDK 10 or later, results of run 699, the contract of ADR-0008 in task 3 | [faf13b2] |
|
| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Throwaway repositories of task 7 deleted at the user's request; action item of RC-059 closed | [daecb7b] |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -112,6 +112,30 @@ network), a private runner with no internet, and an image that differs from
|
|||||||
`ubuntu-latest`. Those belong to the contract (task 3) and to the adoption
|
`ubuntu-latest`. Those belong to the contract (task 3) and to the adoption
|
||||||
(task 7).
|
(task 7).
|
||||||
|
|
||||||
|
Task 7 was run on 2026-10-13 in two throwaway private repositories of the
|
||||||
|
organisation, `TirSystem/qc-adoption-cpp` and `TirSystem/qc-adoption-csharp`
|
||||||
|
(no real C++ or C# project exists there; the user chose throwaways in chat).
|
||||||
|
Each holds a small passing project, a style file, and a workflow that calls the
|
||||||
|
released `v1.2.0` (`quality-checks-cpp.yml`, `quality-checks-csharp.yml`) with
|
||||||
|
the guide's call. A branch `seeded-failure` with a pull request added a
|
||||||
|
formatting error and a null dereference.
|
||||||
|
|
||||||
|
| Repository | Baseline on `main` | Seeded failure (pull request 1) |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `qc-adoption-cpp` | Pass (runs 899, 900) | Fail (run 906): `main.cpp:3:13: error: code should be clang-formatted`, `main.cpp:5:18: error: Dereference of null pointer ... [clang-analyzer-core.NullDereference]`, `FAIL clang-format`, `FAIL clang-tidy (C++)`, last line `Quality checks failed: clang-format clang-tidy (C++)` |
|
||||||
|
| `qc-adoption-csharp` | Pass (runs 901, 902) | Fail: `src/Program.cs(5,3): error WHITESPACE`, `src/Program.cs(8,27): error CS8602`, `FAIL dotnet format --verify-no-changes`, `FAIL dotnet build -warnaserror` |
|
||||||
|
|
||||||
|
Both statuses (`quality` and `quality-checks-cpp` / `quality-checks-csharp`)
|
||||||
|
appear on the pull requests. One gap in the guides was found and fixed: they
|
||||||
|
said the paths are relative to `working-directory`, but `clang-tidy` and
|
||||||
|
`dotnet` print absolute paths in the workspace of the runner. The guides and
|
||||||
|
their three wiki languages now say so.
|
||||||
|
|
||||||
|
Not covered: a real C++ project with a compile database and a real C# solution
|
||||||
|
with many packages; both stay open until a project of that kind adopts the
|
||||||
|
workflows. The throwaway repositories were deleted at the user's request on 2026-10-13;
|
||||||
|
the run numbers above are kept as the record.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
[BC-001]: ../business-case.md
|
[BC-001]: ../business-case.md
|
||||||
@@ -124,3 +148,5 @@ network), a private runner with no internet, and an image that differs from
|
|||||||
[ADR-0008]: ../adr/adr-0008-cpp-csharp-quality-check-contract.md
|
[ADR-0008]: ../adr/adr-0008-cpp-csharp-quality-check-contract.md
|
||||||
[7bcc67a]: https://git.tirsystem.com/TirSystem/github-action/commit/7bcc67a065ac5f67b4e13ebf243a4bbbe2af47d9
|
[7bcc67a]: https://git.tirsystem.com/TirSystem/github-action/commit/7bcc67a065ac5f67b4e13ebf243a4bbbe2af47d9
|
||||||
[faf13b2]: https://git.tirsystem.com/TirSystem/github-action/commit/faf13b2c2a4901c0171977de1ffc2841023f537a
|
[faf13b2]: https://git.tirsystem.com/TirSystem/github-action/commit/faf13b2c2a4901c0171977de1ffc2841023f537a
|
||||||
|
[2481c26]: https://git.tirsystem.com/TirSystem/github-action/commit/2481c26d802464decd51d75539157093b60e08e8
|
||||||
|
[daecb7b]: https://git.tirsystem.com/TirSystem/github-action/commit/daecb7b452197643b39752b9b453a8c376562354
|
||||||
|
|||||||
@@ -0,0 +1,86 @@
|
|||||||
|
# MIL-008: Wiki publishing as a reusable workflow
|
||||||
|
|
||||||
|
## Metadata
|
||||||
|
| Key | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| ID | MIL-008 |
|
||||||
|
| CrossReference | [BC-001], [MIL-006], [ADR-0004], [RC-060], [RC-061] |
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
|
| --- | --- | --- | --- | --- | --- |
|
||||||
|
| 2026-10-13 | Deprecated | Jens Tirsvad Nielsen | S01 | Initial version; reviewed (RC-060) | [01b9c29] |
|
||||||
|
| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | S01 | Task 5 changed to deprecate the scoped workflow (8 repositories still use it); reviewed (RC-061) | [01b9c29] |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
|
||||||
|
Decide whether the wiki can be published by a reusable workflow that each
|
||||||
|
repository calls, from `docs/wiki/` (the location `process/wiki.md` of the
|
||||||
|
framework prescribes), instead of a scoped workflow that runs in every
|
||||||
|
repository of the organisation and reads `wiki/`.
|
||||||
|
|
||||||
|
## Deliverable
|
||||||
|
|
||||||
|
A reusable workflow `publish-wiki-pages.yml` in `.gitea/workflows/` with a
|
||||||
|
`wiki_dir` input, a caller template for projects, offline tests, a superseding
|
||||||
|
ADR, updated guides and wiki pages, this repository publishing its own wiki
|
||||||
|
from `docs/wiki/` through it, the scoped workflow marked deprecated (not
|
||||||
|
removed), and a release that projects can pin.
|
||||||
|
|
||||||
|
## Go / No-Go Criteria
|
||||||
|
|
||||||
|
| # | Criterion (objectively checkable) | Go | No-Go |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| 1 | The reusable workflow publishes the folder named by `wiki_dir` (default `docs/wiki`), and a repository that has no caller workflow is never written to | Offline tests pass; no caller means no run | Any write without a caller |
|
||||||
|
| 2 | An empty or missing folder never deletes pages, the failure names its category, and the secret is passed explicitly (criteria 1 and 4 of MIL-006 still hold) | Existing tests pass unchanged | A regression |
|
||||||
|
| 3 | This repository publishes its own wiki from `docs/wiki/` through a caller that uses the reusable workflow, and the pages on the host equal the folder | 0 differences read back through the API | Pages differ or the run fails |
|
||||||
|
| 4 | A caller template exists for projects, with the trigger `docs/wiki/**` and the secret named | File exists and is linted (QC-WF-001) | Missing |
|
||||||
|
| 5 | The scoped `publish-wiki.yml` is marked deprecated in its header, the README and ADR-0009, and the repositories that still use it are listed; it is not removed here | Notice present and the list recorded (8 repositories on 2026-10-13) | No notice, or the workflow was removed while a repository still depends on it |
|
||||||
|
| 6 | The change is released as patch 1.2.2 and the moving major tag points at it | `v1` includes the change | Not released |
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
| Depends on | Reason |
|
||||||
|
| --- | --- |
|
||||||
|
| MIL-006 | The publisher script, the prune rule and the safety limits come from it |
|
||||||
|
| `TirSystem/sqa-qc-framework` `process/wiki.md` | Defines `docs/wiki/` and the English plus PO language minimum; unmerged when this was written |
|
||||||
|
|
||||||
|
## Traceability
|
||||||
|
|
||||||
|
| Business Case objective / KPI / user story | Reference |
|
||||||
|
| --- | --- |
|
||||||
|
| O2, O3 | [BC-001] |
|
||||||
|
|
||||||
|
## Ownership
|
||||||
|
|
||||||
|
| Role | Stakeholder ID (SA) |
|
||||||
|
| --- | --- |
|
||||||
|
| Owner | S05 |
|
||||||
|
| Approving reviewer | S01 |
|
||||||
|
|
||||||
|
## Target Date
|
||||||
|
|
||||||
|
2026-11-15 — the Business Case sets no deadline.
|
||||||
|
|
||||||
|
## Tasks
|
||||||
|
|
||||||
|
| # | Task | Summary | Needs its own Use Case/User Story? | Reference |
|
||||||
|
| --- | --- | --- | --- | --- |
|
||||||
|
| 1 | Record the decision | An ADR that supersedes the scoped-delivery part of ADR-0004: publishing is a reusable workflow called by each repository; the caller file is the opt-in, so `wiki/.publish` is no longer a gate; the `prune` setting becomes an input. Keep the rest of ADR-0004 (secret handling) as it stands. | No | |
|
||||||
|
| 2 | Add the reusable workflow | `.gitea/workflows/publish-wiki-pages.yml` with `on: workflow_call`, inputs `wiki_dir` (default `docs/wiki`) and `prune`, and the token as a declared secret. It runs `tools/publish_wiki.py` with `WIKI_DIR` and the prune setting from the inputs. Update the script and its tests: the marker is no longer required. | No | |
|
||||||
|
| 3 | Add the caller template | A `publish-wiki.yml` caller for projects (`uses: TirSystem/github-action/.gitea/workflows/publish-wiki-pages.yml@v1`, `paths: docs/wiki/**`, `secrets:` mapped). Proposed in `sqa-qc-framework` under `templates/ci/` once this is released. | No | |
|
||||||
|
| 4 | Move this repository's wiki and call the workflow | `git mv wiki docs/wiki`, check the links and the translation hash comments, add the caller, publish, read the pages back. | No | |
|
||||||
|
| 5 | Deprecate the scoped workflow | Do not remove it: on 2026-10-13, 8 repositories still publish through it with `wiki/.publish` (`sqa-and-qc`, `sqa-qc-framework`, `sqa-qc-checklists`, `github-action`, `repo-foundry` and three of `Tirsvad-Udemy-100-days-of-code`), and none calls the reusable workflow yet. Add a deprecation notice to its header, the README table and ADR-0009, and record the list. The migrations and the removal are a follow-up milestone after this release (ADR-0006: a removed workflow is a new major). | No | |
|
||||||
|
| 6 | Update guides and wiki pages | Describe the caller, `docs/wiki/` and the removed marker in the onboarding and credentials guides and in the English, Danish and Bahasa Malaysia pages (rule 8 of `AGENTS.md`). | No | |
|
||||||
|
| 7 | Release | Release as a patch, 1.2.1 to 1.2.2, as the owner instructed: changelog entry and a release through the release workflow; the `v1` tag moves with it. ADR-0006 classes a new workflow as minor, so the changelog entry states the deviation and the reason. Nothing is removed, so no consumer breaks. | No | |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[BC-001]: ../business-case.md
|
||||||
|
[MIL-006]: ./mil-006-shared-wiki-publishing.md
|
||||||
|
[ADR-0004]: ../adr/adr-0004-shared-wiki-publishing-opt-in.md
|
||||||
|
[RC-060]: ../sqa/reviews/rc-060-mil-008-plan.md
|
||||||
|
[RC-061]: ../sqa/reviews/rc-061-mil-008-task-5-deferred.md
|
||||||
|
[01b9c29]: https://git.tirsystem.com/TirSystem/github-action/commit/01b9c2972b4317bcc590540010aea0eaf7f30014
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
# MIL-009: Migrate the wiki callers and remove the scoped workflow
|
||||||
|
|
||||||
|
## Metadata
|
||||||
|
| Key | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| ID | MIL-009 |
|
||||||
|
| CrossReference | [BC-001], [MIL-008], [ADR-0004], [ADR-0006], [ADR-0009] |
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
|
| --- | --- | --- | --- | --- | --- |
|
||||||
|
| 2026-10-13 | Deprecated | Jens Tirsvad Nielsen | S01 | Initial version | [2b53ee6] |
|
||||||
|
| 2026-10-14 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Plan accepted in chat with the defaults: target date 2026-11-30 confirmed, `027-sandbox` and `028-pomodoro` do not publish, framework release 0.7.0; reviewed (RC-064) | [2f267df] |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
|
||||||
|
Decide whether the scoped `publish-wiki.yml` can be removed: every repository
|
||||||
|
that publishes its wiki through it has moved to `docs/wiki/` and calls the
|
||||||
|
reusable workflow `publish-wiki-pages.yml`, and ADR-0004 is superseded by
|
||||||
|
ADR-0009. MIL-008 deprecated the scoped workflow and kept it because seven
|
||||||
|
repositories still depended on it (checked on 2026-10-13).
|
||||||
|
|
||||||
|
## Deliverable
|
||||||
|
|
||||||
|
A released framework with the caller template; each of the seven repositories
|
||||||
|
publishing its wiki from `docs/wiki/` through a caller, with its marker removed;
|
||||||
|
the scoped workflow, its marker code path, its tests and every mention of the
|
||||||
|
marker as an opt-in removed; ADR-0004 marked superseded; and the major release
|
||||||
|
2.0.0 with the tag `v2`.
|
||||||
|
|
||||||
|
## Go / No-Go Criteria
|
||||||
|
|
||||||
|
| # | Criterion (objectively checkable) | Go | No-Go |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| 1 | The framework is released as 0.7.0 with `templates/ci/publish-wiki.yml` and `process/wiki.md`, as a tag | The tag exists and each migrating repository pins it | No tag, or a repository pins an unmerged commit |
|
||||||
|
| 2 | Each of the seven repositories publishes from `docs/wiki/` through a caller of `publish-wiki-pages.yml`, and has no `wiki/.publish` | A scan of the instance lists the seven with a caller and no marker | Any marker or missing caller remains |
|
||||||
|
| 3 | The wiki of each of the seven equals its `docs/wiki/` after the first run | 0 differences read back through the API for each | A difference, or a failed run |
|
||||||
|
| 4 | A scan of every repository of the four organisations finds no `wiki/.publish` and no run of the scoped workflow that wrote | None found | Any found |
|
||||||
|
| 5 | The scoped `publish-wiki.yml`, the marker code path of `tools/publish_wiki.py`, their tests and the marker text of the guides, README and wiki pages are removed | Offline tests pass; a search finds no `wiki/.publish` outside the changelog and ADRs | A mention remains, or a test fails |
|
||||||
|
| 6 | ADR-0004 is `Superseded by ADR-0009` with a review record, and ADR-0009 links back | Both rows and RC present | Missing |
|
||||||
|
| 7 | Release 2.0.0 is published with a Breaking entry, `v2` points to it, and `v1` still points to 1.2.2 | Tags read back through the API | `v1` moved, or no Breaking entry |
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
| Depends on | Reason |
|
||||||
|
| --- | --- |
|
||||||
|
| MIL-008 | Provides the reusable workflow, the deprecation and the list of repositories |
|
||||||
|
| `TirSystem/sqa-qc-framework` release | The caller template and `process/wiki.md` must be a tag before a repository pins them |
|
||||||
|
|
||||||
|
## Traceability
|
||||||
|
|
||||||
|
| Business Case objective / KPI / user story | Reference |
|
||||||
|
| --- | --- |
|
||||||
|
| O2, O3 | [BC-001] |
|
||||||
|
|
||||||
|
## Ownership
|
||||||
|
|
||||||
|
| Role | Stakeholder ID (SA) |
|
||||||
|
| --- | --- |
|
||||||
|
| Owner | S05 |
|
||||||
|
| Approving reviewer | S01 |
|
||||||
|
|
||||||
|
## Target Date
|
||||||
|
|
||||||
|
2026-11-30 — confirmed on 2026-10-14 by S01 in chat; the Business Case sets no deadline.
|
||||||
|
|
||||||
|
## Tasks
|
||||||
|
|
||||||
|
| # | Task | Summary | Needs its own Use Case/User Story? | Reference |
|
||||||
|
| --- | --- | --- | --- | --- |
|
||||||
|
| 1 | Release the framework | `TirSystem/sqa-qc-framework` has the caller template and `process/wiki.md` merged (pull request 45). Add the changelog entry, tag the release and record the tag. Needed before any repository pins the template. | No | |
|
||||||
|
| 2 | Migrate the three TirSystem projects | `sqa-and-qc`, `sqa-qc-framework` and `sqa-qc-checklists`: move `wiki/` to `docs/wiki/`, copy the caller from `templates/ci/publish-wiki.yml`, remove `wiki/.publish`, fix the paths in their generators and documents, move the framework pin to the released tag, one pull request each. Confirm the organisation secret `TOKEN_FOR_GITEA_WIKI` is present. | No | |
|
||||||
|
| 3 | Migrate `repo-foundry` | Same steps for `TirSystem-BashScript/repo-foundry` (21 wiki files); the organisation `TirSystem-BashScript` needs its own `TOKEN_FOR_GITEA_WIKI` secret (S03). | No | |
|
||||||
|
| 4 | Migrate the three Udemy repositories | Same steps for `021-snake-game`, `024-snake` and `025-weather` of `Tirsvad-Udemy-100-days-of-code` (5 wiki files each). `027-sandbox` and `028-pomodoro`, which have `docs/wiki/` and no marker, do not publish (decided by S01 on 2026-10-14). | No | |
|
||||||
|
| 5 | Verify the migration | After each first run read the wiki back and compare it with `docs/wiki/`; then scan the four organisations for `wiki/.publish` and for repositories still publishing through the scoped workflow. Record the results in this milestone. | No | |
|
||||||
|
| 6 | Remove the scoped workflow | Delete `.gitea/scoped_workflows/publish-wiki.yml`, the marker path of `tools/publish_wiki.py` (the `WIKI_PRUNE` input becomes required), the tests that cover it and the marker text in the guides, the README and the three wiki languages. Keep the drift test for the remaining scoped workflow. | No | |
|
||||||
|
| 7 | Supersede ADR-0004 | Mark ADR-0004 `Superseded by ADR-0009` for the delivery and marker parts (new version row, review record), and make ADR-0009 link back. | No | |
|
||||||
|
| 8 | Release 2.0.0 | Breaking entry (a removed workflow and marker); upgrade guide for callers; release through the release workflow; `v2` is created and `v1` stays at 1.2.2. Move the examples in the guides to `@v2` where the guide describes the new major. | No | |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[BC-001]: ../business-case.md
|
||||||
|
[MIL-008]: ./mil-008-wiki-reusable-workflow.md
|
||||||
|
[ADR-0004]: ../adr/adr-0004-shared-wiki-publishing-opt-in.md
|
||||||
|
[ADR-0009]: ../adr/adr-0009-wiki-publishing-reusable-workflow.md
|
||||||
|
[ADR-0006]: ../adr/adr-0006-release-process-and-version-pinning.md
|
||||||
|
[2b53ee6]: https://git.tirsystem.com/TirSystem/github-action/commit/2b53ee6d21babdefc30556b92c3300c6cd956898
|
||||||
|
[2f267df]: https://git.tirsystem.com/TirSystem/github-action/commit/2f267df2a270087cb7dc482af4ce4f4341e97b03
|
||||||
+21
-7
@@ -4,25 +4,25 @@
|
|||||||
| Key | Value |
|
| Key | Value |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| ID | PP-001 |
|
| ID | PP-001 |
|
||||||
| CrossReference | [BC-001], [SA-001], [ADR-0002], [US-001], [MIL-001], [MIL-002], [MIL-003], [MIL-004], [MIL-005], [MIL-006], [MIL-007] |
|
| CrossReference | [BC-001], [SA-001], [ADR-0002], [US-001], [MIL-001], [MIL-002], [MIL-003], [MIL-004], [MIL-005], [MIL-006], [MIL-007], [MIL-008], [MIL-009] |
|
||||||
|
|
||||||
## Version History
|
## Version History
|
||||||
| Date | Status | Author | Reviewer | Change | Commit |
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
| --- | --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- | --- |
|
||||||
| 2026-10-10 | Deprecated | Jens Tirsvad Nielsen | S01 | Dates confirmed by S01 (stand-in for S05); the confirmation item is removed from Open Issues | [ea06eaa] |
|
| 2026-10-13 | Deprecated | Jens Tirsvad Nielsen | S01 | Added MIL-009 (migrate the wiki callers, remove the scoped workflow); review RC-064 awaits S01 | [86e69ce] |
|
||||||
| 2026-10-11 | Accepted | Jens Tirsvad Nielsen | S01 | Added MIL-007 (quality checks for C++ and C#); reviewed (RC-053) | [e3ad1fa] |
|
| 2026-10-14 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | MIL-009 plan accepted in chat with the defaults; target date 2026-11-30 confirmed (RC-064) | [2f267df] |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Purpose
|
## Purpose
|
||||||
|
|
||||||
This plan schedules seven milestones that move the repository from one
|
This plan schedules nine milestones that move the repository from one
|
||||||
workflow with known defects to a documented, versioned collection of shared
|
workflow with known defects to a documented, versioned collection of shared
|
||||||
workflows. The Business Case sets no deadline, so the dates are the plan's own; they were confirmed on 2026-10-10 by S01, standing in for S05 (ADR-0002).
|
workflows. The Business Case sets no deadline, so the dates are the plan's own; they were confirmed on 2026-10-10 by S01, standing in for S05 (ADR-0002).
|
||||||
|
|
||||||
## Planning Assumptions
|
## Planning Assumptions
|
||||||
|
|
||||||
- Week 1 starts 2026-10-05; phases are two weeks long; the last decision is 2026-12-26; MIL-007 follows in January 2027 (2027-01-04 to 2027-01-16, confirmed on 2026-10-11 by S01).
|
- Week 1 starts 2026-10-05; phases are two weeks long; the last decision is 2026-12-26; MIL-007 follows in January 2027 (2027-01-04 to 2027-01-16, confirmed on 2026-10-11 by S01). MIL-008 amends the shared wiki publishing of MIL-006 and runs in parallel with the October and November windows: its work started on 2026-10-13 and its decision date is its own Target Date, 2026-11-15. MIL-009 follows MIL-008 and runs from 2026-11-16 to its proposed Target Date, 2026-11-30, confirmed by S01 in chat on 2026-10-14.
|
||||||
- Work on a milestone starts only after its `MIL-*` document is `Accepted`.
|
- Work on a milestone starts only after its `MIL-*` document is `Accepted`.
|
||||||
- Dates were confirmed on 2026-10-10 by S01, standing in for S05 (ADR-0002).
|
- Dates were confirmed on 2026-10-10 by S01, standing in for S05 (ADR-0002).
|
||||||
|
|
||||||
@@ -37,6 +37,8 @@ workflows. The Business Case sets no deadline, so the dates are the plan's own;
|
|||||||
| Wiki and translations | [MIL-005] | 2026-11-30 to 2026-12-12 | 2026-12-12 | S05 | None yet | Wiki pages in English, Danish and Bahasa Malaysia, kept current by every pull request | [Milestone MIL-005] |
|
| Wiki and translations | [MIL-005] | 2026-11-30 to 2026-12-12 | 2026-12-12 | S05 | None yet | Wiki pages in English, Danish and Bahasa Malaysia, kept current by every pull request | [Milestone MIL-005] |
|
||||||
| Shared wiki publishing | [MIL-006] | 2026-12-14 to 2026-12-26 | 2026-12-26 | S05 | None yet | Scoped publish-wiki workflow with opt-in, piloted in one other repository | [Milestone MIL-006] |
|
| Shared wiki publishing | [MIL-006] | 2026-12-14 to 2026-12-26 | 2026-12-26 | S05 | None yet | Scoped publish-wiki workflow with opt-in, piloted in one other repository | [Milestone MIL-006] |
|
||||||
| Quality checks for C++ and C# | [MIL-007] | 2027-01-04 to 2027-01-16 | 2027-01-16 | S05 | US-001.09, US-001.10 (to extend) | Reusable quality-check workflows for C++ and C#, released | [Milestone MIL-007] |
|
| Quality checks for C++ and C# | [MIL-007] | 2027-01-04 to 2027-01-16 | 2027-01-16 | S05 | US-001.09, US-001.10 (to extend) | Reusable quality-check workflows for C++ and C#, released | [Milestone MIL-007] |
|
||||||
|
| Wiki publishing as a reusable workflow | [MIL-008] | 2026-10-13 to 2026-11-15 | 2026-11-15 | S05 | None yet | Reusable publish-wiki-pages workflow, wiki in docs/wiki, scoped workflow deprecated, released as 1.2.2 | [Milestone MIL-008] |
|
||||||
|
| Migrate the wiki callers and remove the scoped workflow | [MIL-009] | 2026-11-16 to 2026-11-30 | 2026-11-30 | S05 | None yet | Seven repositories publish through a caller, scoped workflow removed, ADR-0004 superseded, released as 2.0.0 | Not created yet (the sync creates it when MIL-009 is Accepted) |
|
||||||
|
|
||||||
```plantuml
|
```plantuml
|
||||||
@startgantt
|
@startgantt
|
||||||
@@ -55,6 +57,10 @@ Project starts 2026-10-05
|
|||||||
[MIL-006 Go/No-Go] happens 2026-12-26
|
[MIL-006 Go/No-Go] happens 2026-12-26
|
||||||
[MIL-007 C++ and C#] starts 2027-01-04 and ends 2027-01-16
|
[MIL-007 C++ and C#] starts 2027-01-04 and ends 2027-01-16
|
||||||
[MIL-007 Go/No-Go] happens 2027-01-16
|
[MIL-007 Go/No-Go] happens 2027-01-16
|
||||||
|
[MIL-008 Reusable wiki workflow] starts 2026-10-13 and ends 2026-11-15
|
||||||
|
[MIL-008 Go/No-Go] happens 2026-11-15
|
||||||
|
[MIL-009 Migrate and remove] starts 2026-11-16 and ends 2026-11-30
|
||||||
|
[MIL-009 Go/No-Go] happens 2026-11-30
|
||||||
@endgantt
|
@endgantt
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -69,6 +75,8 @@ Project starts 2026-10-05
|
|||||||
| Wiki pages in English, Danish and Bahasa Malaysia | [MIL-005] |
|
| Wiki pages in English, Danish and Bahasa Malaysia | [MIL-005] |
|
||||||
| The wiki publisher shared with other repositories through scoped delivery | [MIL-006] |
|
| The wiki publisher shared with other repositories through scoped delivery | [MIL-006] |
|
||||||
| Gitea Actions workflows for software engineers (quality checks for C++ and C#) | [MIL-007] |
|
| Gitea Actions workflows for software engineers (quality checks for C++ and C#) | [MIL-007] |
|
||||||
|
| The wiki publisher as a workflow that repositories call, from docs/wiki | [MIL-008] |
|
||||||
|
| Moving every publishing repository to the called workflow and removing the scoped one | [MIL-009] |
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
@@ -76,6 +84,7 @@ Project starts 2026-10-05
|
|||||||
MIL-001 → MIL-002 → MIL-003 → MIL-004
|
MIL-001 → MIL-002 → MIL-003 → MIL-004
|
||||||
MIL-002 → MIL-005 → MIL-006
|
MIL-002 → MIL-005 → MIL-006
|
||||||
MIL-003 + MIL-004 → MIL-007
|
MIL-003 + MIL-004 → MIL-007
|
||||||
|
MIL-006 → MIL-008 → MIL-009
|
||||||
```
|
```
|
||||||
|
|
||||||
A No-Go moves every later window by the rework time of the failed milestone.
|
A No-Go moves every later window by the rework time of the failed milestone.
|
||||||
@@ -86,6 +95,8 @@ A No-Go moves every later window by the rework time of the failed milestone.
|
|||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| The runner cannot provide the C++ or C# tools (MIL-007) | The workflows need a custom runner image or a longer install | MIL-007 task 2 verifies it first; the ADR of task 3 says what a build-dependent check needs from the caller. |
|
| The runner cannot provide the C++ or C# tools (MIL-007) | The workflows need a custom runner image or a longer install | MIL-007 task 2 verifies it first; the ADR of task 3 says what a build-dependent check needs from the caller. |
|
||||||
| Reusable workflow support is missing on the instance | MIL-003 and MIL-004 change shape | Verify first in each milestone (MIL-002 task 2, MIL-003 task 1); fall back to copied templates. |
|
| Reusable workflow support is missing on the instance | MIL-003 and MIL-004 change shape | Verify first in each milestone (MIL-002 task 2, MIL-003 task 1); fall back to copied templates. |
|
||||||
|
| Eight repositories still publish through the scoped workflow that MIL-008 deprecates (MIL-008 task 5) | Removing it would stop their wikis | It is deprecated and kept; a follow-up milestone migrates them and removes it in a major release (RC-061). |
|
||||||
|
| An organisation has no `TOKEN_FOR_GITEA_WIKI` secret, or a repository fails its first run (MIL-009 tasks 3 and 4) | The wiki of that repository stops updating | MIL-009 task 5 reads each wiki back after the first run; the scoped workflow is removed only after every repository passes. |
|
||||||
| Security review by S05 is a bottleneck | Milestone decisions slip | Keep milestones small and plan review time before each decision date. |
|
| Security review by S05 is a bottleneck | Milestone decisions slip | Keep milestones small and plan review time before each decision date. |
|
||||||
|
|
||||||
## Open Issues
|
## Open Issues
|
||||||
@@ -258,6 +269,8 @@ no tests, no release process.
|
|||||||
[MIL-005]: ./milestones/mil-005-wiki-and-translations.md
|
[MIL-005]: ./milestones/mil-005-wiki-and-translations.md
|
||||||
[MIL-006]: ./milestones/mil-006-shared-wiki-publishing.md
|
[MIL-006]: ./milestones/mil-006-shared-wiki-publishing.md
|
||||||
[MIL-007]: ./milestones/mil-007-cpp-csharp-quality-checks.md
|
[MIL-007]: ./milestones/mil-007-cpp-csharp-quality-checks.md
|
||||||
|
[MIL-008]: ./milestones/mil-008-wiki-reusable-workflow.md
|
||||||
|
[MIL-009]: ./milestones/mil-009-migrate-wiki-callers-and-remove-scoped-workflow.md
|
||||||
[Milestone MIL-001]: https://git.tirsystem.com/TirSystem/github-action/milestone/18
|
[Milestone MIL-001]: https://git.tirsystem.com/TirSystem/github-action/milestone/18
|
||||||
[Milestone MIL-002]: https://git.tirsystem.com/TirSystem/github-action/milestone/19
|
[Milestone MIL-002]: https://git.tirsystem.com/TirSystem/github-action/milestone/19
|
||||||
[Milestone MIL-003]: https://git.tirsystem.com/TirSystem/github-action/milestone/20
|
[Milestone MIL-003]: https://git.tirsystem.com/TirSystem/github-action/milestone/20
|
||||||
@@ -265,6 +278,7 @@ no tests, no release process.
|
|||||||
[Milestone MIL-005]: https://git.tirsystem.com/TirSystem/github-action/milestone/93
|
[Milestone MIL-005]: https://git.tirsystem.com/TirSystem/github-action/milestone/93
|
||||||
[Milestone MIL-006]: https://git.tirsystem.com/TirSystem/github-action/milestone/94
|
[Milestone MIL-006]: https://git.tirsystem.com/TirSystem/github-action/milestone/94
|
||||||
[Milestone MIL-007]: https://git.tirsystem.com/TirSystem/github-action/milestone/95
|
[Milestone MIL-007]: https://git.tirsystem.com/TirSystem/github-action/milestone/95
|
||||||
[ea06eaa]: https://git.tirsystem.com/TirSystem/github-action/commit/ea06eaaa698247d20e4a8e2694d7acbb1de58b63
|
[Milestone MIL-008]: https://git.tirsystem.com/TirSystem/github-action/milestone/152
|
||||||
[b74ee0e]: https://git.tirsystem.com/TirSystem/github-action/commit/b74ee0e5cfd04f25ba5f2c1addc80699147c479a
|
[b74ee0e]: https://git.tirsystem.com/TirSystem/github-action/commit/b74ee0e5cfd04f25ba5f2c1addc80699147c479a
|
||||||
[e3ad1fa]: https://git.tirsystem.com/TirSystem/github-action/commit/e3ad1fa7e7eef57a6793a479edb41ac6fd2db688
|
[86e69ce]: https://git.tirsystem.com/TirSystem/github-action/commit/86e69ce85df72ea3caed40253e08231c73187fde
|
||||||
|
[2f267df]: https://git.tirsystem.com/TirSystem/github-action/commit/2f267df2a270087cb7dc482af4ce4f4341e97b03
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
# Review Record: MIL-006 (task 6 amendment)
|
||||||
|
|
||||||
|
## Metadata
|
||||||
|
| Key | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| ID | RC-058 |
|
||||||
|
| CrossReference | [MIL-006], [QC-MIL-001] |
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
|
| --- | --- | --- | --- | --- | --- |
|
||||||
|
| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version | [8051cc4] |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Artifact Under Review
|
||||||
|
|
||||||
|
- Instance reviewed: [MIL-006] after the amendment of 2026-10-13: task 6 (fix the page title of hyphenated pages) added
|
||||||
|
- Checklist used: [QC-MIL-001]
|
||||||
|
- Scope: delta re-review of the added task 6 and of the unchanged criteria it touches; the earlier record is [RC-049]
|
||||||
|
- Language and domain: n/a (technical type)
|
||||||
|
- Language reviewer: none
|
||||||
|
- Mode: autonomous, not independent (the reviewer is `AI as stand-in for S01`; the user accepted the plan in chat on 2026-10-13)
|
||||||
|
|
||||||
|
## Checklist Results
|
||||||
|
|
||||||
|
| # | Criterion | Status | Evidence/Notes |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| 1 | A concrete deliverable is defined for every gate | Pass | Task 6 states the change (title sent with spaces), a test and a changelog entry. |
|
||||||
|
| 2 | Explicit Go/No-Go criteria are stated for each gate | Pass | Unchanged: the six criteria. The fix serves criterion 3 (pages equal `wiki/`), which the hyphen defect made unreachable for links. |
|
||||||
|
| 3 | Dependencies on other milestones are explicitly mapped | Pass | Unchanged: MIL-005 and MIL-002. |
|
||||||
|
| 4 | Each milestone is traceable to a Business Case objective or KPI | Pass | Unchanged: O2, O3. |
|
||||||
|
| 5 | Milestone owner and approving reviewer are identified | Pass | Owner S05, approving reviewer S01. |
|
||||||
|
| 6 | Milestone has a defined target date consistent with project constraints | Pass | 2026-12-26, unchanged. |
|
||||||
|
|
||||||
|
## Overall Verdict
|
||||||
|
|
||||||
|
Go - all six criteria pass. It restores the status Accepted of MIL-006, which the publishing action and the plan-first gate require before the fix is committed. S01 is stood in for by the AI as the user chose autonomous mode in chat on 2026-10-13; there is no independent reader, and the decision stays open to challenge in the run summary.
|
||||||
|
|
||||||
|
## Action Items
|
||||||
|
|
||||||
|
| Action | Owner | Due |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Release the fix, re-run publish-wiki in `sqa-and-qc`, `sqa-qc-framework` and `sqa-qc-checklists`, delete the stale `*.-.md` pages | S05 | after the fix is merged |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[MIL-006]: ../../milestones/mil-006-shared-wiki-publishing.md
|
||||||
|
[RC-049]: ./rc-049-mil-006-outcome.md
|
||||||
|
[QC-MIL-001]: ../../../framework/qc/qc-milestones-gateways.md
|
||||||
|
[8051cc4]: https://git.tirsystem.com/TirSystem/github-action/commit/8051cc4489ee9bcf3b6c62f2eafcb2013b7d2f90
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
# Review Record: MIL-007 (task 7 results)
|
||||||
|
|
||||||
|
## Metadata
|
||||||
|
| Key | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| ID | RC-059 |
|
||||||
|
| CrossReference | [MIL-007], [QC-MIL-001] |
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
|
| --- | --- | --- | --- | --- | --- |
|
||||||
|
| 2026-10-13 | Deprecated | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version | [2481c26] |
|
||||||
|
| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Action item closed: the two throwaway repositories were deleted at the user's request | [daecb7b] |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Artifact Under Review
|
||||||
|
|
||||||
|
- Instance reviewed: [MIL-007] with the verification results of task 7 (adoption in two throwaway repositories, seeded failures)
|
||||||
|
- Checklist used: [QC-MIL-001]
|
||||||
|
- Scope: delta re-review of the added results and of Go/No-Go criteria 3 and 4; the earlier record is [RC-055]
|
||||||
|
- Language and domain: n/a (technical type)
|
||||||
|
- Language reviewer: none
|
||||||
|
- Mode: autonomous, not independent (the reviewer is `AI as stand-in for S01`; the user chose the throwaway repositories in chat on 2026-10-13)
|
||||||
|
|
||||||
|
## Checklist Results
|
||||||
|
|
||||||
|
| # | Criterion | Status | Evidence/Notes |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| 1 | A concrete deliverable is defined for every gate | Pass | Unchanged. |
|
||||||
|
| 2 | Explicit Go/No-Go criteria are stated for each gate | Pass | Criterion 3 (tool, file and line in the log) and 4 (status on pull requests) are met for both workflows by runs 906 and the C# run of the same pull request, as the verification results table lists. |
|
||||||
|
| 3 | Dependencies on other milestones are explicitly mapped | Pass | Unchanged: MIL-003 and MIL-004. |
|
||||||
|
| 4 | Each milestone is traceable to a Business Case objective or KPI | Pass | Unchanged: O4, US-001.09, .10, .16, .17. |
|
||||||
|
| 5 | Milestone owner and approving reviewer are identified | Pass | Owner S05, approving reviewer S01. |
|
||||||
|
| 6 | Milestone has a defined target date consistent with project constraints | Pass | 2027-01-16, unchanged. |
|
||||||
|
|
||||||
|
## Overall Verdict
|
||||||
|
|
||||||
|
Go - all six criteria pass. Criteria 3 and 4 of the milestone are verified on throwaway repositories only; a real project with a compile database or many packages is still open and is said so in the results. S01 is stood in for by the AI as the user chose autonomous mode; there is no independent reader, and the decision stays open to challenge.
|
||||||
|
|
||||||
|
## Action Items
|
||||||
|
|
||||||
|
| Action | Owner | Due |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| ~~Decide whether to delete `TirSystem/qc-adoption-cpp` and `TirSystem/qc-adoption-csharp`~~ Closed 2026-10-13: both were deleted at the user's request | S05 | done |
|
||||||
|
| Adopt the workflows in a real C++ and a real C# project | S05 | before the milestone closes |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[MIL-007]: ../../milestones/mil-007-cpp-csharp-quality-checks.md
|
||||||
|
[RC-055]: ./rc-055-mil-007-amendment.md
|
||||||
|
[QC-MIL-001]: ../../../framework/qc/qc-milestones-gateways.md
|
||||||
|
[2481c26]: https://git.tirsystem.com/TirSystem/github-action/commit/2481c26d802464decd51d75539157093b60e08e8
|
||||||
|
[daecb7b]: https://git.tirsystem.com/TirSystem/github-action/commit/daecb7b452197643b39752b9b453a8c376562354
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
# Review Record: MIL-008
|
||||||
|
|
||||||
|
## Metadata
|
||||||
|
| Key | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| ID | RC-060 |
|
||||||
|
| CrossReference | [MIL-008], [QC-MIL-001] |
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
|
| --- | --- | --- | --- | --- | --- |
|
||||||
|
| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | S01 | Initial version | [01b9c29] |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Artifact Under Review
|
||||||
|
|
||||||
|
- Instance reviewed: [MIL-008]
|
||||||
|
- Checklist used: [QC-MIL-001]
|
||||||
|
- Scope: full review
|
||||||
|
- Language and domain: n/a (technical type)
|
||||||
|
- Language reviewer: none
|
||||||
|
- Mode: supervised (S01, the user, accepted the plan in chat on 2026-10-13; the AI prepared the record)
|
||||||
|
|
||||||
|
## Checklist Results
|
||||||
|
|
||||||
|
| # | Criterion | Status | Evidence/Notes |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| 1 | A concrete deliverable is defined for every gate | Pass | The Deliverable section names the reusable workflow, the caller template, tests, the superseding ADR, the moved wiki and the release. |
|
||||||
|
| 2 | Explicit Go/No-Go criteria are stated for each gate | Pass | Six criteria, each with a checkable Go and No-Go (tests, a read-back with 0 differences, the `v1` tag). |
|
||||||
|
| 3 | Dependencies on other milestones are explicitly mapped | Pass | MIL-006, and the framework's `process/wiki.md`, which is still unmerged and is named as such. |
|
||||||
|
| 4 | Each milestone is traceable to a Business Case objective or KPI | Pass | O2 and O3 of [BC-001], as for MIL-006. |
|
||||||
|
| 5 | Milestone owner and approving reviewer are identified | Pass | Owner S05, approving reviewer S01. |
|
||||||
|
| 6 | Milestone has a defined target date consistent with project constraints | Pass | 2026-11-15; the Business Case sets no deadline and the plan's last decision is 2026-12-26. |
|
||||||
|
|
||||||
|
## Overall Verdict
|
||||||
|
|
||||||
|
Go - all six criteria pass. The release is a patch (1.2.1 to 1.2.2) by the owner's decision, although ADR-0006 classes a new workflow as minor and a removed one as breaking; task 7 records the deviation in the changelog, and S01 chose it over a minor release and over keeping the scoped workflow.
|
||||||
|
|
||||||
|
## Action Items
|
||||||
|
|
||||||
|
| Action | Owner | Due |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Add MIL-008 to the Project Plan (milestone table, CrossReference, dependency graph) and review it | S05 | before the pull request |
|
||||||
|
| Merge `process/wiki.md` in `sqa-qc-framework` before this repository pins it | S05 | before task 3 ships |
|
||||||
|
| List the repositories that publish through the scoped workflow before task 5 removes it | S05 | before task 5 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[MIL-008]: ../../milestones/mil-008-wiki-reusable-workflow.md
|
||||||
|
[QC-MIL-001]: ../../../framework/qc/artifacts/qc-milestones-gateways.md
|
||||||
|
[01b9c29]: https://git.tirsystem.com/TirSystem/github-action/commit/01b9c2972b4317bcc590540010aea0eaf7f30014
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
# Review Record: MIL-008 (task 5 deferred)
|
||||||
|
|
||||||
|
## Metadata
|
||||||
|
| Key | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| ID | RC-061 |
|
||||||
|
| CrossReference | [MIL-008], [QC-MIL-001], [RC-060] |
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
|
| --- | --- | --- | --- | --- | --- |
|
||||||
|
| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | S01 | Initial version | [01b9c29] |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Artifact Under Review
|
||||||
|
|
||||||
|
- Instance reviewed: [MIL-008] after the amendment of 2026-10-13: task 5 changed from removing the scoped workflow to deprecating it, with the criterion that follows from it
|
||||||
|
- Checklist used: [QC-MIL-001]
|
||||||
|
- Scope: delta re-review of the amended task 5, criterion 5 and the Deliverable; the earlier record is [RC-060]
|
||||||
|
- Language and domain: n/a (technical type)
|
||||||
|
- Language reviewer: none
|
||||||
|
- Mode: supervised (S01, the user, chose option 1, defer the removal, in chat on 2026-10-13; the AI prepared the record)
|
||||||
|
|
||||||
|
## Checklist Results
|
||||||
|
|
||||||
|
| # | Criterion | Status | Evidence/Notes |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| 1 | A concrete deliverable is defined for every gate | Pass | The Deliverable now says the scoped workflow is marked deprecated, not removed. |
|
||||||
|
| 2 | Explicit Go/No-Go criteria are stated for each gate | Pass | Criterion 5 is checkable: a notice in the header, the README and ADR-0009, and the list of repositories recorded; No-Go if it was removed while a repository depends on it. |
|
||||||
|
| 3 | Dependencies on other milestones are explicitly mapped | Pass | Unchanged: MIL-006 and the framework's `process/wiki.md`. |
|
||||||
|
| 4 | Each milestone is traceable to a Business Case objective or KPI | Pass | Unchanged: O2, O3. |
|
||||||
|
| 5 | Milestone owner and approving reviewer are identified | Pass | Owner S05, approving reviewer S01. |
|
||||||
|
| 6 | Milestone has a defined target date consistent with project constraints | Pass | 2026-11-15, unchanged. |
|
||||||
|
|
||||||
|
## Overall Verdict
|
||||||
|
|
||||||
|
Go - all six criteria pass. The amendment follows from a scan on 2026-10-13: 8 repositories still publish through the scoped workflow and none calls the reusable one, so removal would have broken them. Removal and the migrations move to a follow-up milestone that needs its own plan.
|
||||||
|
|
||||||
|
## Action Items
|
||||||
|
|
||||||
|
| Action | Owner | Due |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Plan the follow-up milestone: migrate the 8 repositories (move `wiki/` to `docs/wiki/`, add the caller from `templates/ci/publish-wiki.yml`), then remove the scoped workflow in a major release | S05 | after the 1.2.2 release |
|
||||||
|
| Add MIL-008 to the Project Plan and review it (open since RC-060) | S05 | before the pull request |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[MIL-008]: ../../milestones/mil-008-wiki-reusable-workflow.md
|
||||||
|
[QC-MIL-001]: ../../../framework/qc/artifacts/qc-milestones-gateways.md
|
||||||
|
[RC-060]: ./rc-060-mil-008-plan.md
|
||||||
|
[01b9c29]: https://git.tirsystem.com/TirSystem/github-action/commit/01b9c2972b4317bcc590540010aea0eaf7f30014
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
# Review Record: PP-001 Project Plan (MIL-008)
|
||||||
|
|
||||||
|
## Metadata
|
||||||
|
| Key | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| ID | RC-062 |
|
||||||
|
| CrossReference | [PP-001], [BC-001], [MIL-008] |
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
|
| --- | --- | --- | --- | --- | --- |
|
||||||
|
| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | S01 | Initial version | [9aeb74e] |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Artifact Under Review
|
||||||
|
|
||||||
|
- Instance reviewed: [PP-001]
|
||||||
|
- Checklist used: none: the Project Plan has no QC checklist. Validated against the Business Case [BC-001] and the Go / No-Go criteria of each listed milestone, as `PP.md` prescribes.
|
||||||
|
- Scope: delta re-review for the added MIL-008 row, Gantt entries, Scope Coverage, Dependencies, one Plan Risk and the counts; the earlier record is RC-053
|
||||||
|
- Language and domain: n/a (technical type)
|
||||||
|
- Mode: supervised (the AI prepared the record; S01, the user, gave the Go in chat on 2026-10-13)
|
||||||
|
|
||||||
|
## Checklist Results
|
||||||
|
|
||||||
|
| # | Criterion | Status | Evidence/Notes |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| 1 | Every milestone in the plan has a `MIL-*` document and the plan's dates equal that document's target date | Pass | MIL-001 to MIL-008 exist; the MIL-008 decision date 2026-11-15 equals its Target Date. |
|
||||||
|
| 2 | Every Business Case scope item is covered by a gateway | Pass | The wiki publisher shared with other repositories is covered by MIL-006 and MIL-008 (O2, O3). |
|
||||||
|
| 3 | The schedule respects the Business Case constraints | Pass | The Business Case sets no deadline; the MIL-008 window overlaps the October and November windows and says so under Planning Assumptions. |
|
||||||
|
| 4 | Dependencies between milestones are stated | Pass | MIL-006 to MIL-008 is in the Dependencies diagram and in MIL-008's own document. |
|
||||||
|
| 5 | Every gateway has an owner who is a stakeholder ID | Pass | MIL-008 is owned by S05. |
|
||||||
|
| 6 | Plan content is internally consistent | Pass | "Eight milestones", the Planning Assumptions, the Gantt entries, the Gateway Schedule and the Scope Coverage agree. |
|
||||||
|
| 7 | Open Issues are current | Pass | Unchanged items remain open; a plan risk was added for the repositories that still use the scoped workflow. |
|
||||||
|
|
||||||
|
## Overall Verdict
|
||||||
|
|
||||||
|
Go - all seven criteria pass; no findings. S01 gave the Go in chat on 2026-10-13, after the change was merged as pull request 137 with the plan row `Proposed`; this record and the plan row are set to `Accepted` in the follow-up.
|
||||||
|
|
||||||
|
## Action Items
|
||||||
|
|
||||||
|
| Action | Owner | Due |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Set PP-001 and this record to `Accepted` (done in the follow-up that follows pull request 137) | S05 | 2026-10-13 |
|
||||||
|
| Review ADR-0009 (still without a review record) | S01 | after the plan |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[PP-001]: ../../project-plan.md
|
||||||
|
[BC-001]: ../../business-case.md
|
||||||
|
[MIL-008]: ../../milestones/mil-008-wiki-reusable-workflow.md
|
||||||
|
[9aeb74e]: https://git.tirsystem.com/TirSystem/github-action/commit/9aeb74e8b09bb7882847e9bd5d569dbc9856fc03
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
# Review Record: ADR-0009 Wiki publishing as a reusable workflow
|
||||||
|
|
||||||
|
## Metadata
|
||||||
|
| Key | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| ID | RC-063 |
|
||||||
|
| CrossReference | [ADR-0009], [QC-ADR-001] |
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
|
| --- | --- | --- | --- | --- | --- |
|
||||||
|
| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | S01 | Initial version | [8c2c52e] |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Artifact Under Review
|
||||||
|
|
||||||
|
- Instance reviewed: [ADR-0009]
|
||||||
|
- Checklist used: [QC-ADR-001]
|
||||||
|
- Scope: full review
|
||||||
|
- Language and domain: n/a (technical type)
|
||||||
|
- Mode: supervised (the AI prepared the record; S01, the user, gave the Go in chat on 2026-10-13)
|
||||||
|
|
||||||
|
## Checklist Results
|
||||||
|
|
||||||
|
| # | Criterion | Status | Evidence/Notes |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| 1 | The ID (`ADR-NNNN`, 4-digit) matches the filename number and is unique and sequential | Pass | ADR-0009 in `adr-0009-wiki-publishing-reusable-workflow.md`; follows ADR-0008. |
|
||||||
|
| 2 | Context states the problem, the forces (cost, risk, constraints) and the options evaluated | Pass | Names the scoped delivery, its gate, the fixed trigger path and version, and the new folder rule. |
|
||||||
|
| 3 | At least two options were considered, or the absence of alternatives is justified | Pass | Two options: keep the scoped workflow and read both folders, or a reusable workflow. |
|
||||||
|
| 4 | Decision is stated in one or two unhedged sentences and matches one of the evaluated options | Pass | Two sentences; matches option 2. The rules below it add detail only. |
|
||||||
|
| 5 | Consequences list both Positive and Negative outcomes | Pass | Finding fixed during this review: the consequence "passing a declared secret is not yet verified" was out of date, because run 316 verified it on 2026-10-13. It now says so. Four positive and four negative outcomes. |
|
||||||
|
| 6 | Quality-attribute impacts (performance, security, portability, etc.) are named where the decision affects them | Pass | Finding fixed during this review: the security impact was implicit. A positive bullet (explicit secret, no fallback) and a negative bullet (whoever changes the caller changes the folder and `prune`) were added. |
|
||||||
|
| 7 | Affected Artifacts are listed as links, and each is also in CrossReference | Pass | MIL-008 and ADR-0004 are linked and cited. |
|
||||||
|
| 8 | Status changes are recorded as new Version History rows with a Change summary and Commit link; retained rows are never rewritten | Pass | The findings fix is a new row; the first row is kept unchanged. |
|
||||||
|
| 9 | A superseded or deprecated ADR names its successor, and the successor links back | N-A | ADR-0004 is superseded only in part and stays in force until the scoped workflow is removed; see the action item. |
|
||||||
|
| 10 | Written in business or technical language of the domain, with no unexplained abbreviations | Pass | Finding fixed during this review: "PO language" is now "the product owner's language". |
|
||||||
|
| 11 | Status is one of `Proposed`, `Accepted`, `Rejected`, `Deprecated` or `Superseded by ADR-NNNN`, and every Version History row uses only these | Pass | `Proposed` only. |
|
||||||
|
|
||||||
|
## Overall Verdict
|
||||||
|
|
||||||
|
Go - all applicable criteria pass; the three findings (criteria 5, 6 and 10) were fixed during the review. S01 gave the Go in chat on 2026-10-13; there is no independent reader.
|
||||||
|
|
||||||
|
## Action Items
|
||||||
|
|
||||||
|
| Action | Owner | Due |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| When the scoped workflow is removed, mark ADR-0004 superseded by ADR-0009 for the delivery and marker parts (new version row and review record) | S01 | the follow-up milestone |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[ADR-0009]: ../../adr/adr-0009-wiki-publishing-reusable-workflow.md
|
||||||
|
[QC-ADR-001]: ../../../framework/qc/artifacts/qc-adr.md
|
||||||
|
[8c2c52e]: https://git.tirsystem.com/TirSystem/github-action/commit/8c2c52ebd2a27e4d0edb4008c31c002718d280fb
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Review Record: MIL-009 and PP-001 (MIL-009)
|
||||||
|
|
||||||
|
## Metadata
|
||||||
|
| Key | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| ID | RC-064 |
|
||||||
|
| CrossReference | [MIL-009], [PP-001], [BC-001], [QC-MIL-001] |
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
|
| --- | --- | --- | --- | --- | --- |
|
||||||
|
| 2026-10-14 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version; accepted | [86e69ce] |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Artifact Under Review
|
||||||
|
|
||||||
|
- Instance reviewed: [MIL-009]; delta of [PP-001] for the added milestone
|
||||||
|
- Checklist used: [QC-MIL-001] for the milestone; for the plan, the criteria of `PP.md` (no QC checklist exists for PP-001)
|
||||||
|
- Scope: full review of MIL-009; delta re-review of PP-001, earlier record RC-062
|
||||||
|
- Language and domain: n/a (technical type)
|
||||||
|
- Mode: autonomous, not independent (the reviewer is `AI as stand-in for S01`; the user accepted the plan in chat on 2026-10-14 with the defaults)
|
||||||
|
|
||||||
|
## Checklist Results
|
||||||
|
|
||||||
|
| # | Criterion | Status | Evidence/Notes |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| 1 | A concrete deliverable is defined for every gate | Pass | MIL-009 lists the released framework, seven callers, the removals, the superseded ADR and 2.0.0. |
|
||||||
|
| 2 | Explicit Go/No-Go criteria are stated for each gate | Pass | Seven criteria with checkable Go and No-Go (tag, callers, read-backs, scan, removal, ADR rows, tags). |
|
||||||
|
| 3 | Dependencies on other milestones are explicitly mapped | Pass | MIL-008 and the framework release; in the plan's Dependencies diagram (`MIL-008 -> MIL-009`). |
|
||||||
|
| 4 | Each milestone is traceable to a Business Case objective or KPI | Pass | O2, O3 of [BC-001]. |
|
||||||
|
| 5 | Milestone owner and approving reviewer are identified | Pass | Owner S05, approving reviewer S01. |
|
||||||
|
| 6 | Milestone has a defined target date consistent with project constraints | Pass | 2026-11-30 is proposed and equals the plan's decision date; the Business Case sets no deadline. S01 has not confirmed it, as MIL-009 and the plan say; this is an action item. |
|
||||||
|
|
||||||
|
## Plan delta (PP-001)
|
||||||
|
|
||||||
|
| # | Criterion | Status | Evidence/Notes |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| 1 | Every milestone has a `MIL-*` document and the plan's dates equal that document's target date | Pass | MIL-001 to MIL-009 exist; the MIL-009 decision date equals its Target Date. |
|
||||||
|
| 2 | Every Business Case scope item is covered by a gateway | Pass | Scope Coverage names MIL-009 for the removal of the scoped publisher. |
|
||||||
|
| 3 | The schedule respects the Business Case constraints | Pass | No deadline in the Business Case; the window follows MIL-008. |
|
||||||
|
| 4 | Dependencies between milestones are stated | Pass | `MIL-006 -> MIL-008 -> MIL-009`. |
|
||||||
|
| 5 | Every gateway has an owner who is a stakeholder ID | Pass | S05. |
|
||||||
|
| 6 | Plan content is internally consistent | Pass | "Nine milestones", the assumptions, the Gantt, the schedule and the coverage agree. |
|
||||||
|
| 7 | Open Issues are current | Pass | A plan risk was added for missing organisation secrets and failed first runs. |
|
||||||
|
|
||||||
|
## Overall Verdict
|
||||||
|
|
||||||
|
Go - all criteria pass. The user switched to autonomous mode and accepted the plan in chat on 2026-10-14 with the defaults (target date 2026-11-30, no publishing for `027-sandbox` and `028-pomodoro`, framework release 0.7.0); the AI records the acceptance as stand-in for S01. There is no independent reader and the decision stays open to challenge in the run summary.
|
||||||
|
|
||||||
|
## Action Items
|
||||||
|
|
||||||
|
| Action | Owner | Due |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Check that `TirSystem-BashScript` has its own `TOKEN_FOR_GITEA_WIKI` (S03); stop and report if it does not | S03 | MIL-009 task 3 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[MIL-009]: ../../milestones/mil-009-migrate-wiki-callers-and-remove-scoped-workflow.md
|
||||||
|
[PP-001]: ../../project-plan.md
|
||||||
|
[BC-001]: ../../business-case.md
|
||||||
|
[QC-MIL-001]: ../../../framework/qc/artifacts/qc-milestones-gateways.md
|
||||||
|
[86e69ce]: https://git.tirsystem.com/TirSystem/github-action/commit/86e69ce85df72ea3caed40253e08231c73187fde
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
# Review Record: ADR-0004 superseded by ADR-0009
|
||||||
|
|
||||||
|
## Metadata
|
||||||
|
| Key | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| ID | RC-065 |
|
||||||
|
| CrossReference | [ADR-0004], [ADR-0009], [QC-ADR-001], [MIL-009] |
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
|
| --- | --- | --- | --- | --- | --- |
|
||||||
|
| 2026-10-14 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version | [22fc323] |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Artifact Under Review
|
||||||
|
|
||||||
|
- Instance reviewed: [ADR-0004] after the status change to `Superseded by ADR-0009` on 2026-10-14
|
||||||
|
- Checklist used: [QC-ADR-001]
|
||||||
|
- Scope: delta re-review of the criteria the status change touches (7, 8, 9, 11); the earlier record is RC-018
|
||||||
|
- Language and domain: n/a (technical type)
|
||||||
|
- Mode: autonomous, not independent (the reviewer is `AI as stand-in for S01`; the user accepted the plan [MIL-009] in chat on 2026-10-14)
|
||||||
|
|
||||||
|
## Checklist Results
|
||||||
|
|
||||||
|
| # | Criterion | Status | Evidence/Notes |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| 1 | The ID matches the filename number and is unique and sequential | Pass | Unchanged. |
|
||||||
|
| 2 | Context states the problem, the forces and the options evaluated | Pass | Unchanged. |
|
||||||
|
| 3 | At least two options were considered | Pass | Unchanged. |
|
||||||
|
| 4 | Decision is stated in one or two unhedged sentences and matches an evaluated option | Pass | Unchanged. |
|
||||||
|
| 5 | Consequences list both Positive and Negative outcomes | Pass | Unchanged. |
|
||||||
|
| 6 | Quality-attribute impacts are named where the decision affects them | Pass | Unchanged. |
|
||||||
|
| 7 | Affected Artifacts are listed as links, and each is also in CrossReference | Pass | ADR-0009 is added to both. |
|
||||||
|
| 8 | Status changes are recorded as new Version History rows with a Change summary and Commit link; retained rows are never rewritten | Pass | The change is a new row; the earlier `Accepted` row became `Deprecated` and its content is unchanged. |
|
||||||
|
| 9 | A superseded or deprecated ADR names its successor, and the successor links back | Pass | The status names ADR-0009; ADR-0009 lists ADR-0004 under Affected Artifacts and in CrossReference. This closes the N-A of RC-018. |
|
||||||
|
| 10 | Written in the language of the domain, with no unexplained abbreviations | Pass | Unchanged. |
|
||||||
|
| 11 | Status is one of the allowed values and every row uses only these | Pass | `Deprecated` and `Superseded by ADR-0009`. |
|
||||||
|
|
||||||
|
## Overall Verdict
|
||||||
|
|
||||||
|
Go - all criteria pass. The scoped delivery and the marker are replaced and removed (MIL-009 tasks 2 to 6); the token and empty-folder rules of this ADR stand and are carried by ADR-0009. The AI records the acceptance as stand-in for S01; there is no independent reader, and the decision stays open to challenge in the run summary.
|
||||||
|
|
||||||
|
## Action Items
|
||||||
|
|
||||||
|
| Action | Owner | Due |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| None open | - | - |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[ADR-0004]: ../../adr/adr-0004-shared-wiki-publishing-opt-in.md
|
||||||
|
[ADR-0009]: ../../adr/adr-0009-wiki-publishing-reusable-workflow.md
|
||||||
|
[QC-ADR-001]: ../../../framework/qc/artifacts/qc-adr.md
|
||||||
|
[MIL-009]: ../../milestones/mil-009-migrate-wiki-callers-and-remove-scoped-workflow.md
|
||||||
|
[22fc323]: https://git.tirsystem.com/TirSystem/github-action/commit/22fc323b41074ee0029ea2f07445a8e329e15d15
|
||||||
@@ -4,13 +4,13 @@
|
|||||||
| Key | Value |
|
| Key | Value |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| ID | TM-001 |
|
| ID | TM-001 |
|
||||||
| CrossReference | [BC-001], [SA-001], [PP-001], [MIL-001], [MIL-002], [MIL-003], [MIL-004], [MIL-005], [MIL-006], [MIL-007], [RC-001], [RC-002], [RC-003], [RC-004], [RC-005], [RC-006], [RC-007], [RC-008], [RC-009], [RC-010], [RC-011], [RC-012], [RC-013], [RC-014], [RC-015], [RC-016], [RC-017], [RC-018], [RC-019], [RC-020], [RC-021], [RC-022], [RC-023], [RC-024], [RC-025], [RC-026], [RC-027], [RC-028], [RC-029], [RC-030], [RC-031], [RC-032], [RC-033], [RC-034], [RC-035], [RC-036], [RC-037], [RC-038], [RC-039], [RC-040], [RC-041], [RC-042], [RC-043], [RC-044], [RC-045], [RC-046], [RC-047], [RC-048], [RC-049], [RC-050], [RC-051], [RC-052], [RC-053], [RC-054], [RC-055], [RC-056], [RC-057], [ADR-0007], [ADR-0008], [UC-007], [UC-006], [ADR-0006], [UC-005], [ADR-0005], [UCD-001], [US-001], [UC-001], [UC-002], [UC-003], [UC-004], [ADR-0001], [ADR-0002], [ADR-0003], [ADR-0004] |
|
| CrossReference | [BC-001], [SA-001], [PP-001], [MIL-001], [MIL-002], [MIL-003], [MIL-004], [MIL-005], [MIL-006], [MIL-007], [MIL-008], [MIL-009], [RC-001], [RC-002], [RC-003], [RC-004], [RC-005], [RC-006], [RC-007], [RC-008], [RC-009], [RC-010], [RC-011], [RC-012], [RC-013], [RC-014], [RC-015], [RC-016], [RC-017], [RC-018], [RC-019], [RC-020], [RC-021], [RC-022], [RC-023], [RC-024], [RC-025], [RC-026], [RC-027], [RC-028], [RC-029], [RC-030], [RC-031], [RC-032], [RC-033], [RC-034], [RC-035], [RC-036], [RC-037], [RC-038], [RC-039], [RC-040], [RC-041], [RC-042], [RC-043], [RC-044], [RC-045], [RC-046], [RC-047], [RC-048], [RC-049], [RC-050], [RC-051], [RC-052], [RC-053], [RC-054], [RC-055], [RC-056], [RC-057], [RC-058], [RC-059], [RC-060], [RC-061], [RC-062], [RC-063], [RC-064], [RC-065], [ADR-0007], [ADR-0008], [ADR-0009], [UC-007], [UC-006], [ADR-0006], [UC-005], [ADR-0005], [UCD-001], [US-001], [UC-001], [UC-002], [UC-003], [UC-004], [ADR-0001], [ADR-0002], [ADR-0003], [ADR-0004] |
|
||||||
|
|
||||||
## Version History
|
## Version History
|
||||||
| Date | Status | Author | Reviewer | Change | Commit |
|
| Date | Status | Author | Reviewer | Change | Commit |
|
||||||
| --- | --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- | --- |
|
||||||
| 2026-10-11 | Deprecated | Jens Tirsvad Nielsen | S01 | Added RC-055 (MIL-007 amendment) | [faf13b2] |
|
| 2026-10-14 | Proposed | Jens Tirsvad Nielsen | S01 | MIL-009, PP-001 and RC-064 accepted | [2f267df] |
|
||||||
| 2026-10-11 | Accepted | Jens Tirsvad Nielsen | S01 | Added RC-056 and RC-057 (UC-005 and US-001 for C++ and C#) | [1bc56f8] |
|
| 2026-10-14 | Proposed | Jens Tirsvad Nielsen | S01 | Added RC-065 (ADR-0004 superseded by ADR-0009) | [22fc323] |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ updated whenever an artifact instance is created or reviewed.
|
|||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
| [SA-001] | SA | - | [BC-001], [UCD-001] | [RC-004] |
|
| [SA-001] | SA | - | [BC-001], [UCD-001] | [RC-004] |
|
||||||
| [BC-001] | BC | [SA-001] | [PP-001], [MIL-001], [MIL-002], [MIL-003], [MIL-004], [MIL-005], [MIL-006] | [RC-001], [RC-008] |
|
| [BC-001] | BC | [SA-001] | [PP-001], [MIL-001], [MIL-002], [MIL-003], [MIL-004], [MIL-005], [MIL-006] | [RC-001], [RC-008] |
|
||||||
| [PP-001] | PP | [BC-001], [SA-001] | [MIL-001], [MIL-002], [MIL-003], [MIL-004], [MIL-005], [MIL-006], [MIL-007], [US-001] | [RC-002], [RC-009], [RC-015], [RC-017], [RC-025], [RC-032], [RC-053] |
|
| [PP-001] | PP | [BC-001], [SA-001] | [MIL-001], [MIL-002], [MIL-003], [MIL-004], [MIL-005], [MIL-006], [MIL-007], [MIL-008], [MIL-009], [US-001] | [RC-002], [RC-009], [RC-015], [RC-017], [RC-025], [RC-032], [RC-053], [RC-062], [RC-064] |
|
||||||
| [MIL-001] | MIL | [BC-001], [PP-001] | [MIL-002] | [RC-003], [RC-026] |
|
| [MIL-001] | MIL | [BC-001], [PP-001] | [MIL-002] | [RC-003], [RC-026] |
|
||||||
| [MIL-002] | MIL | [BC-001], [PP-001], [MIL-001] | [MIL-003], [MIL-005] | [RC-005], [RC-027] |
|
| [MIL-002] | MIL | [BC-001], [PP-001], [MIL-001] | [MIL-003], [MIL-005] | [RC-005], [RC-027] |
|
||||||
| [MIL-003] | MIL | [BC-001], [PP-001], [MIL-002] | [MIL-004] | [RC-006], [RC-028], [RC-033], [RC-039] |
|
| [MIL-003] | MIL | [BC-001], [PP-001], [MIL-002] | [MIL-004] | [RC-006], [RC-028], [RC-033], [RC-039] |
|
||||||
@@ -38,8 +38,10 @@ updated whenever an artifact instance is created or reviewed.
|
|||||||
| [RC-005] | RC | [MIL-002] | - | - |
|
| [RC-005] | RC | [MIL-002] | - | - |
|
||||||
| [RC-006] | RC | [MIL-003] | - | - |
|
| [RC-006] | RC | [MIL-003] | - | - |
|
||||||
| [MIL-005] | MIL | [BC-001], [PP-001], [MIL-002] | [MIL-006] | [RC-010], [RC-011], [RC-030], [RC-050] |
|
| [MIL-005] | MIL | [BC-001], [PP-001], [MIL-002] | [MIL-006] | [RC-010], [RC-011], [RC-030], [RC-050] |
|
||||||
| [MIL-006] | MIL | [BC-001], [PP-001], [MIL-002], [MIL-005] | - | [RC-016], [RC-031], [RC-049] |
|
| [MIL-006] | MIL | [BC-001], [PP-001], [MIL-002], [MIL-005] | - | [RC-016], [RC-031], [RC-049], [RC-058] |
|
||||||
| [MIL-007] | MIL | [BC-001], [PP-001], [MIL-003], [MIL-004], [ADR-0008] | - | [RC-052], [RC-055] |
|
| [MIL-007] | MIL | [BC-001], [PP-001], [MIL-003], [MIL-004], [ADR-0008] | - | [RC-052], [RC-055], [RC-059] |
|
||||||
|
| [MIL-008] | MIL | [BC-001], [PP-001], [MIL-006], [ADR-0004] | [MIL-009] | [RC-060], [RC-061] |
|
||||||
|
| [MIL-009] | MIL | [BC-001], [PP-001], [MIL-008], [ADR-0004], [ADR-0006], [ADR-0009] | - | [RC-064] |
|
||||||
| [RC-007] | RC | [MIL-004] | - | - |
|
| [RC-007] | RC | [MIL-004] | - | - |
|
||||||
| [RC-008] | RC | [BC-001] | - | - |
|
| [RC-008] | RC | [BC-001] | - | - |
|
||||||
| [RC-009] | RC | [PP-001] | - | - |
|
| [RC-009] | RC | [PP-001] | - | - |
|
||||||
@@ -47,7 +49,7 @@ updated whenever an artifact instance is created or reviewed.
|
|||||||
| [ADR-0001] | ADR | [BC-001], [MIL-005] | [ADR-0003] | [RC-012] |
|
| [ADR-0001] | ADR | [BC-001], [MIL-005] | [ADR-0003] | [RC-012] |
|
||||||
| [ADR-0002] | ADR | [SA-001], [RC-001] | - | [RC-013] |
|
| [ADR-0002] | ADR | [SA-001], [RC-001] | - | [RC-013] |
|
||||||
| [ADR-0003] | ADR | [MIL-005], [ADR-0001], [RC-011] | [ADR-0004] | [RC-014] |
|
| [ADR-0003] | ADR | [MIL-005], [ADR-0001], [RC-011] | [ADR-0004] | [RC-014] |
|
||||||
| [ADR-0004] | ADR | [MIL-006], [ADR-0003], [ADR-0002] | - | [RC-018] |
|
| [ADR-0004] | ADR | [MIL-006], [ADR-0003], [ADR-0002] | [ADR-0009] | [RC-018], [RC-065] |
|
||||||
| [RC-011] | RC | [MIL-005] | - | - |
|
| [RC-011] | RC | [MIL-005] | - | - |
|
||||||
| [RC-012] | RC | [ADR-0001] | - | - |
|
| [RC-012] | RC | [ADR-0001] | - | - |
|
||||||
| [RC-013] | RC | [ADR-0002] | - | - |
|
| [RC-013] | RC | [ADR-0002] | - | - |
|
||||||
@@ -68,6 +70,7 @@ updated whenever an artifact instance is created or reviewed.
|
|||||||
| [ADR-0006] | ADR | [MIL-004], [UC-006], [US-001], [ADR-0004], [ADR-0005] | - | [RC-043] |
|
| [ADR-0006] | ADR | [MIL-004], [UC-006], [US-001], [ADR-0004], [ADR-0005] | - | [RC-043] |
|
||||||
| [ADR-0007] | ADR | [MIL-004], [UC-006], [ADR-0006] | - | [RC-047] |
|
| [ADR-0007] | ADR | [MIL-004], [UC-006], [ADR-0006] | - | [RC-047] |
|
||||||
| [ADR-0008] | ADR | [MIL-007], [UC-005], [US-001], [ADR-0005], [ADR-0006] | - | [RC-054] |
|
| [ADR-0008] | ADR | [MIL-007], [UC-005], [US-001], [ADR-0005], [ADR-0006] | - | [RC-054] |
|
||||||
|
| [ADR-0009] | ADR | [MIL-008], [ADR-0003], [ADR-0004], [ADR-0005], [ADR-0006] | - | [RC-063] |
|
||||||
| [UC-007] | UC | [UCD-001], [US-001], [SA-001] | - | [RC-044] |
|
| [UC-007] | UC | [UCD-001], [US-001], [SA-001] | - | [RC-044] |
|
||||||
| [RC-019] | RC | [UCD-001] | - | - |
|
| [RC-019] | RC | [UCD-001] | - | - |
|
||||||
| [RC-020] | RC | [US-001] | - | - |
|
| [RC-020] | RC | [US-001] | - | - |
|
||||||
@@ -108,6 +111,14 @@ updated whenever an artifact instance is created or reviewed.
|
|||||||
| [RC-055] | RC | [MIL-007] | - | - |
|
| [RC-055] | RC | [MIL-007] | - | - |
|
||||||
| [RC-056] | RC | [UC-005] | - | - |
|
| [RC-056] | RC | [UC-005] | - | - |
|
||||||
| [RC-057] | RC | [US-001] | - | - |
|
| [RC-057] | RC | [US-001] | - | - |
|
||||||
|
| [RC-058] | RC | [MIL-006] | - | - |
|
||||||
|
| [RC-059] | RC | [MIL-007] | - | - |
|
||||||
|
| [RC-060] | RC | [MIL-008] | - | - |
|
||||||
|
| [RC-061] | RC | [MIL-008] | - | - |
|
||||||
|
| [RC-062] | RC | [PP-001] | - | - |
|
||||||
|
| [RC-063] | RC | [ADR-0009] | - | - |
|
||||||
|
| [RC-064] | RC | [MIL-009], [PP-001] | - | - |
|
||||||
|
| [RC-065] | RC | [ADR-0004] | - | - |
|
||||||
|
|
||||||
## Coverage Notes
|
## Coverage Notes
|
||||||
|
|
||||||
@@ -128,6 +139,8 @@ updated whenever an artifact instance is created or reviewed.
|
|||||||
[MIL-005]: ../milestones/mil-005-wiki-and-translations.md
|
[MIL-005]: ../milestones/mil-005-wiki-and-translations.md
|
||||||
[MIL-006]: ../milestones/mil-006-shared-wiki-publishing.md
|
[MIL-006]: ../milestones/mil-006-shared-wiki-publishing.md
|
||||||
[MIL-007]: ../milestones/mil-007-cpp-csharp-quality-checks.md
|
[MIL-007]: ../milestones/mil-007-cpp-csharp-quality-checks.md
|
||||||
|
[MIL-008]: ../milestones/mil-008-wiki-reusable-workflow.md
|
||||||
|
[MIL-009]: ../milestones/mil-009-migrate-wiki-callers-and-remove-scoped-workflow.md
|
||||||
[RC-001]: ./reviews/rc-001-business-case.md
|
[RC-001]: ./reviews/rc-001-business-case.md
|
||||||
[RC-002]: ./reviews/rc-002-project-plan.md
|
[RC-002]: ./reviews/rc-002-project-plan.md
|
||||||
[RC-003]: ./reviews/rc-003-mil-001.md
|
[RC-003]: ./reviews/rc-003-mil-001.md
|
||||||
@@ -195,7 +208,16 @@ updated whenever an artifact instance is created or reviewed.
|
|||||||
[RC-055]: ./reviews/rc-055-mil-007-amendment.md
|
[RC-055]: ./reviews/rc-055-mil-007-amendment.md
|
||||||
[RC-056]: ./reviews/rc-056-uc-005-cpp-csharp.md
|
[RC-056]: ./reviews/rc-056-uc-005-cpp-csharp.md
|
||||||
[RC-057]: ./reviews/rc-057-us-001-cpp-csharp.md
|
[RC-057]: ./reviews/rc-057-us-001-cpp-csharp.md
|
||||||
|
[RC-058]: ./reviews/rc-058-mil-006-task-6.md
|
||||||
|
[RC-059]: ./reviews/rc-059-mil-007-adoption.md
|
||||||
|
[RC-060]: ./reviews/rc-060-mil-008-plan.md
|
||||||
|
[RC-061]: ./reviews/rc-061-mil-008-task-5-deferred.md
|
||||||
|
[RC-062]: ./reviews/rc-062-pp-001-mil-008.md
|
||||||
|
[RC-063]: ./reviews/rc-063-adr-0009.md
|
||||||
|
[RC-064]: ./reviews/rc-064-mil-009-plan.md
|
||||||
|
[RC-065]: ./reviews/rc-065-adr-0004-superseded.md
|
||||||
[ADR-0008]: ../adr/adr-0008-cpp-csharp-quality-check-contract.md
|
[ADR-0008]: ../adr/adr-0008-cpp-csharp-quality-check-contract.md
|
||||||
|
[ADR-0009]: ../adr/adr-0009-wiki-publishing-reusable-workflow.md
|
||||||
[ADR-0007]: ../adr/adr-0007-release-publish-destination.md
|
[ADR-0007]: ../adr/adr-0007-release-publish-destination.md
|
||||||
[UC-007]: ../uc-007/uc.md
|
[UC-007]: ../uc-007/uc.md
|
||||||
[UC-006]: ../uc-006/uc.md
|
[UC-006]: ../uc-006/uc.md
|
||||||
@@ -204,3 +226,5 @@ updated whenever an artifact instance is created or reviewed.
|
|||||||
[ADR-0005]: ../adr/adr-0005-quality-check-contract.md
|
[ADR-0005]: ../adr/adr-0005-quality-check-contract.md
|
||||||
[faf13b2]: https://git.tirsystem.com/TirSystem/github-action/commit/faf13b2c2a4901c0171977de1ffc2841023f537a
|
[faf13b2]: https://git.tirsystem.com/TirSystem/github-action/commit/faf13b2c2a4901c0171977de1ffc2841023f537a
|
||||||
[1bc56f8]: https://git.tirsystem.com/TirSystem/github-action/commit/1bc56f8b771531f221f218fc00b147ecc73c051e
|
[1bc56f8]: https://git.tirsystem.com/TirSystem/github-action/commit/1bc56f8b771531f221f218fc00b147ecc73c051e
|
||||||
|
[2f267df]: https://git.tirsystem.com/TirSystem/github-action/commit/2f267df2a270087cb7dc482af4ce4f4341e97b03
|
||||||
|
[22fc323]: https://git.tirsystem.com/TirSystem/github-action/commit/22fc323b41074ee0029ea2f07445a8e329e15d15
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- translation of Capabilities.md, source sha256 a8c03a001880 -->
|
<!-- translation of Capabilities.md, source sha256 7c310ccc1a66 -->
|
||||||
|
|
||||||
> Dette er en oversættelse af [`Capabilities`](Capabilities). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
> Dette er en oversættelse af [`Capabilities`](Capabilities). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
||||||
|
|
||||||
@@ -13,6 +13,7 @@ Rækker, der siger Implementeret eller Vejledninger er skrevet, findes i dag. Re
|
|||||||
| Synkronisering af repositorymetadata (Gitea til GitHub-spejl) | Implementeret i `.gitea/scoped_workflows/`, med offline-tests og et valideringsworkflow |
|
| Synkronisering af repositorymetadata (Gitea til GitHub-spejl) | Implementeret i `.gitea/scoped_workflows/`, med offline-tests og et valideringsworkflow |
|
||||||
| Konfiguration og validering af workflow-credentials | Implementeret for synkroniseringsworkflowet: en forhåndskontrol tjekker begge tokens før enhver ændring ([vejledning](Credentials.da)) |
|
| Konfiguration og validering af workflow-credentials | Implementeret for synkroniseringsworkflowet: en forhåndskontrol tjekker begge tokens før enhver ændring ([vejledning](Credentials.da)) |
|
||||||
| Tilslutning af et repository, administration af runners, fejlfinding | Vejledninger er skrevet ([tilslutning](Onboarding.da), [fejlfinding](Troubleshooting.da)); scoped levering til alle fire organisationers repositories er verificeret (MIL-002) |
|
| Tilslutning af et repository, administration af runners, fejlfinding | Vejledninger er skrevet ([tilslutning](Onboarding.da), [fejlfinding](Troubleshooting.da)); scoped levering til alle fire organisationers repositories er verificeret (MIL-002) |
|
||||||
| Publicering af et repositorys wiki fra `wiki/` (tilmelding, leveres til alle organisationer) | Implementeret i `.gitea/scoped_workflows/publish-wiki.yml`, med offline-tests; et pilotforsøg i et andet repository publicerer sin wiki (MIL-006) |
|
| Publicering af et repositorys wiki fra `docs/wiki/` gennem et kaldt workflow | Implementeret som det genbrugelige workflow `.gitea/workflows/publish-wiki-pages.yml`, med offline-tests; kaldt af hvert repository, der publicerer en wiki, og dette repositorys egen wiki er i `docs/wiki/` (MIL-008, MIL-009) |
|
||||||
| Fælles kvalitetskontrol (Python og shell) | Implementeret som det genbrugelige workflow `.gitea/workflows/quality-checks.yml`, med offline-tests og et forsøg i en anden organisation; taget i brug i RepoFoundry ([vejledning](QualityChecksPythonShell.da)) |
|
| Fælles kvalitetskontrol (Python og shell) | Implementeret som det genbrugelige workflow `.gitea/workflows/quality-checks.yml`, med offline-tests og et forsøg i en anden organisation; taget i brug i RepoFoundry ([vejledning](QualityChecksPythonShell.da)) |
|
||||||
|
| Fælles kvalitetskontrol (C og C++, C#) | Implementeret som de genbrugelige workflows `.gitea/workflows/quality-checks-cpp.yml` og `.gitea/workflows/quality-checks-csharp.yml` med præcise værktøjsversioner og offline-tests; endnu ikke brugt i et andet repository (MIL-007) ([vejledning til C og C++](QualityChecksCpp.da), [vejledning til C#](QualityChecksCSharp.da)) |
|
||||||
| Versioneret udgivelse og publicering | Udgivelsesproces, changelog og opgraderingsvejledning er defineret; udgivelsesworkflowet findes, og `v1.0.0` er udgivet (MIL-004) ([vejledning](Upgrading.da)) |
|
| Versioneret udgivelse og publicering | Udgivelsesproces, changelog og opgraderingsvejledning er defineret; udgivelsesworkflowet findes, og `v1.0.0` er udgivet (MIL-004) ([vejledning](Upgrading.da)) |
|
||||||
@@ -13,6 +13,7 @@ Rows that say Implemented or Guides written exist today. The rest is planned and
|
|||||||
| Synchronize repository metadata (Gitea to GitHub mirror) | Implemented in `.gitea/scoped_workflows/`, with offline tests and a validation workflow |
|
| Synchronize repository metadata (Gitea to GitHub mirror) | Implemented in `.gitea/scoped_workflows/`, with offline tests and a validation workflow |
|
||||||
| Configure and validate workflow credentials | Implemented for the sync workflow: preflight checks both tokens before any change ([guide](Credentials)) |
|
| Configure and validate workflow credentials | Implemented for the sync workflow: preflight checks both tokens before any change ([guide](Credentials)) |
|
||||||
| Onboard a repository, manage runners, diagnose failures | Guides written ([onboarding](Onboarding), [troubleshooting](Troubleshooting)); scoped delivery to the repositories of all four organizations verified (MIL-002) |
|
| Onboard a repository, manage runners, diagnose failures | Guides written ([onboarding](Onboarding), [troubleshooting](Troubleshooting)); scoped delivery to the repositories of all four organizations verified (MIL-002) |
|
||||||
| Publish a repository wiki from `wiki/` (opt-in, delivered to every organization) | Implemented in `.gitea/scoped_workflows/publish-wiki.yml`, with offline tests; a pilot in a second repository publishes its wiki (MIL-006) |
|
| Publish a repository wiki from `docs/wiki/` through a called workflow | Implemented as the reusable workflow `.gitea/workflows/publish-wiki-pages.yml`, with offline tests; called by every repository that publishes a wiki, and this repository's own wiki is in `docs/wiki/` (MIL-008, MIL-009) |
|
||||||
| Shared quality checks (Python and shell) | Implemented as the reusable workflow `.gitea/workflows/quality-checks.yml`, with offline tests and a trial in a second organization; adopted in RepoFoundry ([guide](QualityChecksPythonShell)) |
|
| Shared quality checks (Python and shell) | Implemented as the reusable workflow `.gitea/workflows/quality-checks.yml`, with offline tests and a trial in a second organization; adopted in RepoFoundry ([guide](QualityChecksPythonShell)) |
|
||||||
|
| Shared quality checks (C and C++, C#) | Implemented as the reusable workflows `.gitea/workflows/quality-checks-cpp.yml` and `.gitea/workflows/quality-checks-csharp.yml` with exact tool versions and offline tests; not yet used in another repository (MIL-007) ([C and C++ guide](QualityChecksCpp), [C# guide](QualityChecksCSharp)) |
|
||||||
| Versioned release and publishing | Release process, changelog and upgrade guide defined; the release workflow exists and `v1.0.0` is released (MIL-004) ([guide](Upgrading)) |
|
| Versioned release and publishing | Release process, changelog and upgrade guide defined; the release workflow exists and `v1.0.0` is released (MIL-004) ([guide](Upgrading)) |
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- translation of Capabilities.md, source sha256 a8c03a001880 -->
|
<!-- translation of Capabilities.md, source sha256 7c310ccc1a66 -->
|
||||||
|
|
||||||
> Ini ialah terjemahan [`Capabilities`](Capabilities). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
> Ini ialah terjemahan [`Capabilities`](Capabilities). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
||||||
|
|
||||||
@@ -13,6 +13,7 @@ Baris yang menyatakan Dilaksanakan atau Panduan telah ditulis wujud hari ini. Se
|
|||||||
| Menyegerakkan metadata repositori (Gitea ke cermin GitHub) | Dilaksanakan dalam `.gitea/scoped_workflows/`, dengan ujian luar talian dan aliran kerja pengesahan |
|
| Menyegerakkan metadata repositori (Gitea ke cermin GitHub) | Dilaksanakan dalam `.gitea/scoped_workflows/`, dengan ujian luar talian dan aliran kerja pengesahan |
|
||||||
| Mengkonfigur dan mengesahkan kelayakan (credentials) aliran kerja | Dilaksanakan untuk aliran kerja penyegerakan: semakan awal (preflight) memeriksa kedua-dua token sebelum sebarang perubahan ([panduan](Credentials.ms)) |
|
| Mengkonfigur dan mengesahkan kelayakan (credentials) aliran kerja | Dilaksanakan untuk aliran kerja penyegerakan: semakan awal (preflight) memeriksa kedua-dua token sebelum sebarang perubahan ([panduan](Credentials.ms)) |
|
||||||
| Menyertakan repositori, mengurus runner, mendiagnosis kegagalan | Panduan telah ditulis ([menyertakan repositori](Onboarding.ms), [diagnosis](Troubleshooting.ms)); penghantaran scoped ke repositori keempat-empat organisasi telah disahkan (MIL-002) |
|
| Menyertakan repositori, mengurus runner, mendiagnosis kegagalan | Panduan telah ditulis ([menyertakan repositori](Onboarding.ms), [diagnosis](Troubleshooting.ms)); penghantaran scoped ke repositori keempat-empat organisasi telah disahkan (MIL-002) |
|
||||||
| Menerbitkan wiki repositori daripada `wiki/` (pilih menyertai, dihantar ke setiap organisasi) | Dilaksanakan dalam `.gitea/scoped_workflows/publish-wiki.yml`, dengan ujian luar talian; satu juruterbang dalam repositori kedua menerbitkan wikinya (MIL-006) |
|
| Menerbitkan wiki repositori daripada `docs/wiki/` melalui aliran kerja yang dipanggil | Dilaksanakan sebagai aliran kerja boleh guna semula `.gitea/workflows/publish-wiki-pages.yml`, dengan ujian luar talian; dipanggil oleh setiap repositori yang menerbitkan wiki, dan wiki repositori ini sendiri ada dalam `docs/wiki/` (MIL-008, MIL-009) |
|
||||||
| Semakan kualiti bersama (Python dan shell) | Dilaksanakan sebagai aliran kerja boleh guna semula `.gitea/workflows/quality-checks.yml`, dengan ujian luar talian dan percubaan dalam organisasi kedua; digunakan dalam RepoFoundry ([panduan](QualityChecksPythonShell.ms)) |
|
| Semakan kualiti bersama (Python dan shell) | Dilaksanakan sebagai aliran kerja boleh guna semula `.gitea/workflows/quality-checks.yml`, dengan ujian luar talian dan percubaan dalam organisasi kedua; digunakan dalam RepoFoundry ([panduan](QualityChecksPythonShell.ms)) |
|
||||||
|
| Semakan kualiti bersama (C dan C++, C#) | Dilaksanakan sebagai aliran kerja boleh guna semula `.gitea/workflows/quality-checks-cpp.yml` dan `.gitea/workflows/quality-checks-csharp.yml` dengan versi alat yang tepat dan ujian luar talian; belum digunakan dalam repositori lain (MIL-007) ([panduan C dan C++](QualityChecksCpp.ms), [panduan C#](QualityChecksCSharp.ms)) |
|
||||||
| Keluaran berversi dan penerbitan | Proses keluaran, changelog dan panduan naik taraf telah ditakrifkan; aliran kerja keluaran sudah ada dan `v1.0.0` telah dikeluarkan (MIL-004) ([panduan](Upgrading.ms)) |
|
| Keluaran berversi dan penerbitan | Proses keluaran, changelog dan panduan naik taraf telah ditakrifkan; aliran kerja keluaran sudah ada dan `v1.0.0` telah dikeluarkan (MIL-004) ([panduan](Upgrading.ms)) |
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- translation of Credentials.md, source sha256 10a051e910de -->
|
<!-- translation of Credentials.md, source sha256 cba8a44e1152 -->
|
||||||
|
|
||||||
> Dette er en oversættelse af [`Credentials`](Credentials). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
> Dette er en oversættelse af [`Credentials`](Credentials). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
||||||
|
|
||||||
@@ -56,17 +56,17 @@ Ved succes står der i loggen `Preflight passed: Gitea and GitHub accepted the c
|
|||||||
|
|
||||||
## Secret til publicering af wiki
|
## Secret til publicering af wiki
|
||||||
|
|
||||||
Workflowet **Publish wiki** kopierer `wiki/` til Gitea-wikien i et repository, der har meldt sig til med `wiki/.publish` (se [onboarding.md](Onboarding.da)). Det bruger sin egen secret, så synkroniseringstokenet forbliver skrivebeskyttet.
|
Workflowet **Publish wiki pages** kopierer `docs/wiki/` til Gitea-wikien i et repository, der kalder det (se [onboarding.md](Onboarding.da)). Det bruger sin egen secret, så synkroniseringstokenet forbliver skrivebeskyttet. Kalderen sender secreten i `secrets:`; den nedarves ikke.
|
||||||
|
|
||||||
| Secret | Indhold | Bruges til |
|
| Secret | Indhold | Bruges til |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `TOKEN_FOR_GITEA_WIKI` | Gitea-tokenet, intet andet | At skrive wikisiderne for de repositories i en organisation, der melder sig til |
|
| `TOKEN_FOR_GITEA_WIKI` | Gitea-tokenet, intet andet | At skrive wikisiderne for de repositories i en organisation, der melder sig til |
|
||||||
|
|
||||||
- Gem den som en secret i organisationen for hvert repository, der publicerer. Der er ingen reserve til `TOKEN_FOR_GITEA`: et repository, der har meldt sig til og ikke har secreten, fejler med en konfigurationsfejl, og et repository, der ikke har meldt sig til, behøver den ikke.
|
- Gem den som en secret i organisationen for hvert repository, der publicerer. Der er ingen reserve til `TOKEN_FOR_GITEA`: et repository, der kalder workflowet og ikke har secreten, fejler med en konfigurationsfejl, og et repository, der ikke kalder det, behøver den ikke.
|
||||||
- Tokenet skal have scope `write:repository`, og dets bruger skal have skriveadgang til repositories. Gitea har intet scope kun til wikien, så opret tokenet til en dedikeret bruger. S05 godkender scopet, og S03 gemmer secreten.
|
- Tokenet skal have scope `write:repository`, og dets bruger skal have skriveadgang til repositories. Gitea har intet scope kun til wikien, så opret tokenet til en dedikeret bruger. S05 godkender scopet, og S03 gemmer secreten.
|
||||||
- Kald, der foretages: `GET /repos/{owner}/{repo}`, `GET /repos/{owner}/{repo}/wiki/pages`, `GET`, `POST` og `PATCH /repos/{owner}/{repo}/wiki/...` og, for en side, der ikke længere findes i `wiki/`, `DELETE /repos/{owner}/{repo}/wiki/page/{name}`.
|
- Kald, der foretages: `GET /repos/{owner}/{repo}`, `GET /repos/{owner}/{repo}/wiki/pages`, `GET`, `POST` og `PATCH /repos/{owner}/{repo}/wiki/...` og, for en side, der ikke længere findes i `docs/wiki/`, `DELETE /repos/{owner}/{repo}/wiki/page/{name}`.
|
||||||
- Wikien skal være aktiveret i repositoryets indstillinger. Workflowet nægter at køre, hvis den ikke er det.
|
- Wikien skal være aktiveret i repositoryets indstillinger. Workflowet nægter at køre, hvis den ikke er det.
|
||||||
- Sider, der findes i `wiki/`, overskrives altid fra den, så en ændring i Gitea's weboverflade går tabt ved næste publicering. Sider, der kun findes i wikien, fjernes kun, når `wiki/.publish` indeholder ordet `prune`.
|
- Sider, der findes i `docs/wiki/`, overskrives altid fra den, så en ændring i Gitea's weboverflade går tabt ved næste publicering. Sider, der kun findes i wikien, fjernes kun, når kaldet sætter `prune: "true"`.
|
||||||
|
|
||||||
## Udskiftning af et token
|
## Udskiftning af et token
|
||||||
|
|
||||||
@@ -88,29 +88,30 @@ is ever printed.
|
|||||||
|
|
||||||
## Wiki publishing secret
|
## Wiki publishing secret
|
||||||
|
|
||||||
The workflow **Publish wiki** copies `wiki/` to the Gitea wiki of a repository
|
The workflow **Publish wiki pages** copies `docs/wiki/` to the Gitea wiki of a
|
||||||
that has opted in with `wiki/.publish` (see [onboarding.md](Onboarding)). It
|
repository that calls it (see [onboarding.md](Onboarding)). It uses its own
|
||||||
uses its own secret, so the metadata sync token stays read-only.
|
secret, so the metadata sync token stays read-only. The caller passes the
|
||||||
|
secret in `secrets:`; it is not inherited.
|
||||||
|
|
||||||
| Secret | Content | Used for |
|
| Secret | Content | Used for |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `TOKEN_FOR_GITEA_WIKI` | The Gitea token, nothing else | Writing the wiki pages of the repositories of an organization that opt in |
|
| `TOKEN_FOR_GITEA_WIKI` | The Gitea token, nothing else | Writing the wiki pages of the repositories of an organization that opt in |
|
||||||
|
|
||||||
- Store it as a secret of the organization of each repository that publishes.
|
- Store it as a secret of the organization of each repository that publishes.
|
||||||
There is no fallback to `TOKEN_FOR_GITEA`: a repository that opted in and has
|
There is no fallback to `TOKEN_FOR_GITEA`: a repository that calls the
|
||||||
no such secret fails with a configuration error, and a repository that did
|
workflow and has no such secret fails with a configuration error, and a
|
||||||
not opt in does not need it.
|
repository that does not call it does not need it.
|
||||||
- The token needs scope `write:repository`, and its user needs write access to
|
- The token needs scope `write:repository`, and its user needs write access to
|
||||||
the repositories. Gitea has no wiki-only scope, so create the token for a
|
the repositories. Gitea has no wiki-only scope, so create the token for a
|
||||||
dedicated user. S05 approves the scope and S03 stores the secret.
|
dedicated user. S05 approves the scope and S03 stores the secret.
|
||||||
- Calls made: `GET /repos/{owner}/{repo}`, `GET /repos/{owner}/{repo}/wiki/pages`,
|
- Calls made: `GET /repos/{owner}/{repo}`, `GET /repos/{owner}/{repo}/wiki/pages`,
|
||||||
`GET`, `POST` and `PATCH /repos/{owner}/{repo}/wiki/...` and, for a page that
|
`GET`, `POST` and `PATCH /repos/{owner}/{repo}/wiki/...` and, for a page that
|
||||||
no longer exists in `wiki/`, `DELETE /repos/{owner}/{repo}/wiki/page/{name}`.
|
no longer exists in `docs/wiki/`, `DELETE /repos/{owner}/{repo}/wiki/page/{name}`.
|
||||||
- The wiki must be enabled in the repository settings. The workflow refuses to
|
- The wiki must be enabled in the repository settings. The workflow refuses to
|
||||||
run when it is not.
|
run when it is not.
|
||||||
- Pages that are in `wiki/` are always overwritten from it, so a change made
|
- Pages that are in `docs/wiki/` are always overwritten from it, so a change
|
||||||
in the Gitea web UI is lost on the next publish. Pages that are only in the
|
made in the Gitea web UI is lost on the next publish. Pages that are only in
|
||||||
wiki are removed only when `wiki/.publish` contains the word `prune`.
|
the wiki are removed only when the call sets `prune: "true"`.
|
||||||
|
|
||||||
## Rotating a token
|
## Rotating a token
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- translation of Credentials.md, source sha256 10a051e910de -->
|
<!-- translation of Credentials.md, source sha256 cba8a44e1152 -->
|
||||||
|
|
||||||
> Ini ialah terjemahan [`Credentials`](Credentials). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
> Ini ialah terjemahan [`Credentials`](Credentials). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
||||||
|
|
||||||
@@ -56,17 +56,17 @@ Apabila berjaya, log menyatakan `Preflight passed: Gitea and GitHub accepted the
|
|||||||
|
|
||||||
## Secret untuk menerbitkan wiki
|
## Secret untuk menerbitkan wiki
|
||||||
|
|
||||||
Aliran kerja **Publish wiki** menyalin `wiki/` ke wiki Gitea bagi repositori yang telah memilih menyertainya dengan `wiki/.publish` (lihat [onboarding.md](Onboarding.ms)). Ia menggunakan secret sendiri, supaya token penyegerakan metadata kekal baca sahaja.
|
Aliran kerja **Publish wiki pages** menyalin `docs/wiki/` ke wiki Gitea bagi repositori yang memanggilnya (lihat [onboarding.md](Onboarding.ms)). Ia menggunakan secret sendiri, supaya token penyegerakan metadata kekal baca sahaja. Pemanggil menghantar secret dalam `secrets:`; ia tidak diwarisi.
|
||||||
|
|
||||||
| Secret | Kandungan | Digunakan untuk |
|
| Secret | Kandungan | Digunakan untuk |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `TOKEN_FOR_GITEA_WIKI` | Token Gitea, tiada yang lain | Menulis halaman wiki bagi repositori dalam organisasi yang memilih menyertainya |
|
| `TOKEN_FOR_GITEA_WIKI` | Token Gitea, tiada yang lain | Menulis halaman wiki bagi repositori dalam organisasi yang memilih menyertainya |
|
||||||
|
|
||||||
- Simpan sebagai secret organisasi bagi setiap repositori yang menerbitkan. Tiada sandaran kepada `TOKEN_FOR_GITEA`: repositori yang telah memilih menyertainya dan tidak mempunyai secret itu gagal dengan ralat konfigurasi, dan repositori yang tidak memilih tidak memerlukannya.
|
- Simpan sebagai secret organisasi bagi setiap repositori yang menerbitkan. Tiada sandaran kepada `TOKEN_FOR_GITEA`: repositori yang memanggil aliran kerja dan tidak mempunyai secret itu gagal dengan ralat konfigurasi, dan repositori yang tidak memanggilnya tidak memerlukannya.
|
||||||
- Token mesti mempunyai skop `write:repository`, dan penggunanya mesti mempunyai akses tulis kepada repositori. Gitea tidak mempunyai skop untuk wiki sahaja, jadi cipta token untuk pengguna khusus. S05 meluluskan skop dan S03 menyimpan secret.
|
- Token mesti mempunyai skop `write:repository`, dan penggunanya mesti mempunyai akses tulis kepada repositori. Gitea tidak mempunyai skop untuk wiki sahaja, jadi cipta token untuk pengguna khusus. S05 meluluskan skop dan S03 menyimpan secret.
|
||||||
- Panggilan yang dibuat: `GET /repos/{owner}/{repo}`, `GET /repos/{owner}/{repo}/wiki/pages`, `GET`, `POST` dan `PATCH /repos/{owner}/{repo}/wiki/...` dan, bagi halaman yang tidak lagi wujud dalam `wiki/`, `DELETE /repos/{owner}/{repo}/wiki/page/{name}`.
|
- Panggilan yang dibuat: `GET /repos/{owner}/{repo}`, `GET /repos/{owner}/{repo}/wiki/pages`, `GET`, `POST` dan `PATCH /repos/{owner}/{repo}/wiki/...` dan, bagi halaman yang tidak lagi wujud dalam `docs/wiki/`, `DELETE /repos/{owner}/{repo}/wiki/page/{name}`.
|
||||||
- Wiki mesti diaktifkan dalam tetapan repositori. Aliran kerja enggan berjalan jika ia tidak diaktifkan.
|
- Wiki mesti diaktifkan dalam tetapan repositori. Aliran kerja enggan berjalan jika ia tidak diaktifkan.
|
||||||
- Halaman yang ada dalam `wiki/` sentiasa ditimpa daripadanya, jadi perubahan yang dibuat dalam antara muka web Gitea hilang pada penerbitan seterusnya. Halaman yang hanya ada dalam wiki dibuang hanya apabila `wiki/.publish` mengandungi perkataan `prune`.
|
- Halaman yang ada dalam `docs/wiki/` sentiasa ditimpa daripadanya, jadi perubahan yang dibuat dalam antara muka web Gitea hilang pada penerbitan seterusnya. Halaman yang hanya ada dalam wiki dibuang hanya apabila panggilan menetapkan `prune: "true"`.
|
||||||
|
|
||||||
## Menukar token
|
## Menukar token
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- translation of Home.md, source sha256 5751829e99af -->
|
<!-- translation of Home.md, source sha256 074ce16f3435 -->
|
||||||
|
|
||||||
> Dette er en oversættelse af [`Home`](Home). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
> Dette er en oversættelse af [`Home`](Home). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
||||||
|
|
||||||
@@ -13,20 +13,21 @@ En samling af genbrugelige Gitea Actions-workflows til DevOps-professionelle og
|
|||||||
|
|
||||||
Dette repository er den centrale samling af genbrugelig automatisering til TirSystems repositories. Det primære repository ligger på `git.tirsystem.com` (Gitea) og spejles med push til GitHub.
|
Dette repository er den centrale samling af genbrugelig automatisering til TirSystems repositories. Det primære repository ligger på `git.tirsystem.com` (Gitea) og spejles med push til GitHub.
|
||||||
|
|
||||||
Det indeholder otte workflows: synkronisering af metadata til GitHub-spejlet, publicering af wiki, fælles kvalitetskontrol for Python og shell, for C og C++ og for C#, et udgivelsesworkflow, publicering af accepterede milepæle og repositoryets egen validering. De er listet med formål og diagram under [Workflows](#workflows).
|
Det indeholder ni workflows: synkronisering af metadata til GitHub-spejlet, publicering af wiki (kaldt af hvert repository), fælles kvalitetskontrol for Python og shell, for C og C++ og for C#, et udgivelsesworkflow, publicering af accepterede milepæle og repositoryets egen validering. De er listet med formål og diagram under [Workflows](#workflows).
|
||||||
|
|
||||||
|
|
||||||
## Workflows
|
## Workflows
|
||||||
|
|
||||||
Der er otte workflows i dette repository. Et **scoped** workflow leveres af instansen til alle repositories i TirSystem-organisationerne og kræver intet i repositoryet; et **genbrugeligt** workflow kaldes fra et repository med `uses:`; de øvrige kører kun her. Diagrammerne er PlantUML-kildekode og er på engelsk.
|
Der er ni workflows i dette repository. Et **scoped** workflow leveres af instansen til alle repositories i TirSystem-organisationerne og kræver intet i repositoryet; et **genbrugeligt** workflow kaldes fra et repository med `uses:`; de øvrige kører kun her. Diagrammerne er PlantUML-kildekode og er på engelsk.
|
||||||
|
|
||||||
| Workflow | Fil | Type | Starter ved | Formål |
|
| Workflow | Fil | Type | Starter ved | Formål |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
| Sync GitHub mirror metadata | [`sync-github-metadata.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/scoped_workflows/sync-github-metadata.yml) | Scoped | push til `main`, manuelt, dagligt kl. 03:17 UTC | Kopierer beskrivelsen og emnerne for et Gitea-repository til dets GitHub push-spejl |
|
| Sync GitHub mirror metadata | [`sync-github-metadata.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/scoped_workflows/sync-github-metadata.yml) | Scoped | push til `main`, manuelt, dagligt kl. 03:17 UTC | Kopierer beskrivelsen og emnerne for et Gitea-repository til dets GitHub push-spejl |
|
||||||
| Publish wiki | [`publish-wiki.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/scoped_workflows/publish-wiki.yml) | Scoped, tilmelding med `wiki/.publish` | push til `main`, der ændrer `wiki/**`, manuelt | Publicerer siderne i `wiki/` til repositoryets wiki |
|
| Publish wiki pages | [`publish-wiki-pages.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/publish-wiki-pages.yml) | Genbrugeligt (`workflow_call`) | et kald fra et andet repository | Publicerer siderne i `docs/wiki/` (eller den mappe, `wiki_dir` angiver) til wikien i det kaldende repository |
|
||||||
| Quality checks | [`quality-checks.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks.yml) | Genbrugeligt (`workflow_call`) | et kald fra et andet repository | Kører ruff, mypy, shellcheck og shfmt på de sporede filer og ændrer intet |
|
| Quality checks | [`quality-checks.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks.yml) | Genbrugeligt (`workflow_call`) | et kald fra et andet repository | Kører ruff, mypy, shellcheck og shfmt på de sporede filer og ændrer intet |
|
||||||
| Quality checks C++ | [`quality-checks-cpp.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks-cpp.yml) | Genbrugeligt (`workflow_call`) | et kald fra et andet repository | Kører clang-format og clang-tidy i præcise versioner på de sporede C- og C++-filer og ændrer intet |
|
| Quality checks C++ | [`quality-checks-cpp.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks-cpp.yml) | Genbrugeligt (`workflow_call`) | et kald fra et andet repository | Kører clang-format og clang-tidy i præcise versioner på de sporede C- og C++-filer og ændrer intet |
|
||||||
| Quality checks C# | [`quality-checks-csharp.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks-csharp.yml) | Genbrugeligt (`workflow_call`) | et kald fra et andet repository | Kører `dotnet format` og `dotnet build` på et præcist .NET SDK 10 eller nyere og ændrer intet |
|
| Quality checks C# | [`quality-checks-csharp.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks-csharp.yml) | Genbrugeligt (`workflow_call`) | et kald fra et andet repository | Kører `dotnet format` og `dotnet build` på et præcist .NET SDK 10 eller nyere og ændrer intet |
|
||||||
|
| Publish own wiki | [`publish-own-wiki.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/publish-own-wiki.yml) | Kun dette repository | push til `main`, der ændrer `docs/wiki/**`, manuelt | Kalder det genbrugelige workflow Publish wiki pages for dette repositorys wiki |
|
||||||
| Release | [`release.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/release.yml) | Kun dette repository | manuelt | Opretter versionstagget, udgivelsessiden og major-tagget efter kontrollerne |
|
| Release | [`release.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/release.yml) | Kun dette repository | manuelt | Opretter versionstagget, udgivelsessiden og major-tagget efter kontrollerne |
|
||||||
| Publicering af accepterede milepæle | [`sync-milestones.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/sync-milestones.yml) | Kun dette repository | push til `main`, der ændrer `docs/milestones/**` eller `docs/sqa/reviews/**`, manuelt (tørkørsel som standard) | Opretter eller opdaterer Gitea-milepælen og issues for hver milepæl, der er Accepted med en Go-gennemgang |
|
| Publicering af accepterede milepæle | [`sync-milestones.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/sync-milestones.yml) | Kun dette repository | push til `main`, der ændrer `docs/milestones/**` eller `docs/sqa/reviews/**`, manuelt (tørkørsel som standard) | Opretter eller opdaterer Gitea-milepælen og issues for hver milepæl, der er Accepted med en Go-gennemgang |
|
||||||
| Validate workflows | [`validate-workflows.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/validate-workflows.yml) | Kun dette repository | pull request, push til `main`, manuelt | Læser hvert workflow som YAML og kører offline-testene |
|
| Validate workflows | [`validate-workflows.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/validate-workflows.yml) | Kun dette repository | pull request, push til `main`, manuelt | Læser hvert workflow som YAML og kører offline-testene |
|
||||||
@@ -97,50 +98,6 @@ deactivate Workflow
|
|||||||
@enduml
|
@enduml
|
||||||
```
|
```
|
||||||
|
|
||||||
### Publicering af wiki
|
|
||||||
|
|
||||||
Publicerer `wiki/` til repositoryets wiki, kun i et repository, der har tilmeldt sig med `wiki/.publish`. Ordet `prune` i den fil sletter også sider, som ikke findes i `wiki/`.
|
|
||||||
|
|
||||||
#### Workflow
|
|
||||||
|
|
||||||
```plantuml
|
|
||||||
@startuml
|
|
||||||
title Publish wiki/ to the repository wiki
|
|
||||||
|
|
||||||
autonumber
|
|
||||||
|
|
||||||
actor "Push to main that changes wiki/**,\nor manual trigger" as Trigger
|
|
||||||
participant "Gitea Actions\npublish-wiki" as Workflow
|
|
||||||
participant "shared-scripts\n(tools/publish_wiki.py at v1)" as Script
|
|
||||||
participant "Gitea wiki API" as Wiki
|
|
||||||
|
|
||||||
Trigger -> Workflow: Start workflow
|
|
||||||
activate Workflow
|
|
||||||
Workflow -> Script: Check out the repository and the script, run it
|
|
||||||
activate Script
|
|
||||||
|
|
||||||
alt wiki/.publish does not exist
|
|
||||||
Script --> Workflow: Log that publishing is not enabled and succeed\n(nothing is written)
|
|
||||||
else wiki/ has no Markdown pages
|
|
||||||
Script --> Workflow: Fail with [configuration]\n(an empty wiki/ never deletes pages)
|
|
||||||
else
|
|
||||||
Script -> Script: Read the marker (empty, or the word prune)\nand TOKEN_FOR_GITEA_WIKI
|
|
||||||
Script -> Wiki: GET repository (preflight)
|
|
||||||
Wiki --> Script: Wiki is enabled, token accepted
|
|
||||||
Script -> Wiki: GET pages
|
|
||||||
Wiki --> Script: Existing pages
|
|
||||||
Script -> Wiki: Create new pages, update changed pages
|
|
||||||
opt marker says prune
|
|
||||||
Script -> Wiki: Delete pages that are not in wiki/
|
|
||||||
end
|
|
||||||
Script --> Workflow: Log created, updated and deleted counts
|
|
||||||
end
|
|
||||||
deactivate Script
|
|
||||||
Workflow --> Trigger: Workflow result
|
|
||||||
deactivate Workflow
|
|
||||||
@enduml
|
|
||||||
```
|
|
||||||
|
|
||||||
### Kvalitetskontrol
|
### Kvalitetskontrol
|
||||||
|
|
||||||
Et genbrugeligt workflow til Python og shell, kaldt med `uses: TirSystem/github-action/.gitea/workflows/quality-checks.yml@v1` (se [vejledningen](QualityChecksPythonShell)).
|
Et genbrugeligt workflow til Python og shell, kaldt med `uses: TirSystem/github-action/.gitea/workflows/quality-checks.yml@v1` (se [vejledningen](QualityChecksPythonShell)).
|
||||||
@@ -326,6 +283,90 @@ deactivate Workflow
|
|||||||
@enduml
|
@enduml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Publicering af wiki-sider
|
||||||
|
|
||||||
|
Et genbrugeligt workflow (ADR-0009). Et repository kalder det fra sit eget workflow, så selve kaldet er tilmeldingen, og der behøves ingen markørfil. Det publicerer Markdown-siderne i `wiki_dir` (standard `docs/wiki`) til wikien i det kaldende repository og sletter kun sider, der ikke findes i mappen, når `prune` er `true`.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths: [ "docs/wiki/**" ]
|
||||||
|
jobs:
|
||||||
|
wiki:
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/publish-wiki-pages.yml@v1
|
||||||
|
secrets:
|
||||||
|
TOKEN_FOR_GITEA_WIKI: ${{ secrets.TOKEN_FOR_GITEA_WIKI }}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Workflow
|
||||||
|
|
||||||
|
```plantuml
|
||||||
|
@startuml
|
||||||
|
title Publish docs/wiki to the wiki of the calling repository
|
||||||
|
|
||||||
|
autonumber
|
||||||
|
|
||||||
|
actor "Calling repository\nuses: ...publish-wiki-pages.yml@v1" as Caller
|
||||||
|
participant "Gitea Actions\npublish-wiki-pages" as Workflow
|
||||||
|
participant "shared-scripts\n(tools/publish_wiki.py at tools-ref)" as Script
|
||||||
|
participant "Gitea wiki API" as Wiki
|
||||||
|
|
||||||
|
Caller -> Workflow: Call with wiki_dir, prune and the secret
|
||||||
|
activate Workflow
|
||||||
|
Workflow -> Script: Check out the repository and the script, run it
|
||||||
|
activate Script
|
||||||
|
|
||||||
|
alt wiki_dir does not exist, or has no Markdown pages
|
||||||
|
Script --> Workflow: Fail with [configuration]\n(an empty folder never deletes pages)
|
||||||
|
else
|
||||||
|
Script -> Script: Read prune and TOKEN_FOR_GITEA_WIKI
|
||||||
|
Script -> Wiki: GET repository (preflight)
|
||||||
|
Wiki --> Script: Wiki is enabled, token accepted
|
||||||
|
Script -> Wiki: GET pages
|
||||||
|
Wiki --> Script: Existing pages
|
||||||
|
Script -> Wiki: Create new pages, update changed pages
|
||||||
|
opt prune is true
|
||||||
|
Script -> Wiki: Delete pages that are not in wiki_dir
|
||||||
|
end
|
||||||
|
Script --> Workflow: Log created, updated and deleted counts
|
||||||
|
end
|
||||||
|
deactivate Script
|
||||||
|
Workflow --> Caller: Workflow result
|
||||||
|
deactivate Workflow
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
### Publicering af egen wiki
|
||||||
|
|
||||||
|
Dette repositorys wiki er `docs/wiki/`. Workflowet kalder det genbrugelige workflow ovenfor med dets lokale sti, med `prune` sat til `true`, så wikien altid er lig med mappen, og `tools-ref` sat til `main`, så scriptet fra samme commit kører. Det er den kalder, et projekt kopierer fra frameworkets `templates/ci/publish-wiki.yml`.
|
||||||
|
|
||||||
|
#### Workflow
|
||||||
|
|
||||||
|
```plantuml
|
||||||
|
@startuml
|
||||||
|
title Publish the wiki of this repository (docs/wiki)
|
||||||
|
|
||||||
|
autonumber
|
||||||
|
|
||||||
|
actor "Push to main that changes docs/wiki/**,\nor manual trigger" as Trigger
|
||||||
|
participant "Gitea Actions\npublish-own-wiki" as Caller
|
||||||
|
participant "Gitea Actions\npublish-wiki-pages\n(called by its local path)" as Workflow
|
||||||
|
participant "Gitea wiki API" as Wiki
|
||||||
|
|
||||||
|
Trigger -> Caller: Start workflow
|
||||||
|
activate Caller
|
||||||
|
Caller -> Workflow: Call with wiki_dir docs/wiki, prune true,\ntools-ref main and TOKEN_FOR_GITEA_WIKI
|
||||||
|
activate Workflow
|
||||||
|
Workflow -> Wiki: Create, update and delete pages\nso the wiki equals docs/wiki
|
||||||
|
Wiki --> Workflow: Done
|
||||||
|
Workflow --> Caller: Workflow result
|
||||||
|
deactivate Workflow
|
||||||
|
Caller --> Trigger: Workflow result
|
||||||
|
deactivate Caller
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
### Publicering af accepterede milepæle
|
### Publicering af accepterede milepæle
|
||||||
|
|
||||||
Permanent tilladelse til at publicere: ved et push til `main`, der ændrer milepælene eller deres gennemgange, oprettes eller opdateres hver milepæl, hvis seneste række i Version History er Accepted, og hvis seneste gennemgang er en Go, på Gitea med sine opgaver som issues. Intet lukkes eller slettes. En manuel kørsel er en tørkørsel, medmindre `dry_run` slås fra. Det bruger secret'en `TOKEN_FOR_GITEA` og `--accepted-only`-reglen i det monterede framework (v0.5.0 eller nyere).
|
Permanent tilladelse til at publicere: ved et push til `main`, der ændrer milepælene eller deres gennemgange, oprettes eller opdateres hver milepæl, hvis seneste række i Version History er Accepted, og hvis seneste gennemgang er en Go, på Gitea med sine opgaver som issues. Intet lukkes eller slettes. En manuel kørsel er en tørkørsel, medmindre `dry_run` slås fra. Det bruger secret'en `TOKEN_FOR_GITEA` og `--accepted-only`-reglen i det monterede framework (v0.5.0 eller nyere).
|
||||||
@@ -13,20 +13,21 @@ A collection of reusable Gitea Actions workflows for DevOps professionals and so
|
|||||||
|
|
||||||
This repository is the central collection of reusable automation for TirSystem repositories. The primary repository lives at `git.tirsystem.com` (Gitea) and is push-mirrored to GitHub.
|
This repository is the central collection of reusable automation for TirSystem repositories. The primary repository lives at `git.tirsystem.com` (Gitea) and is push-mirrored to GitHub.
|
||||||
|
|
||||||
It contains eight workflows: metadata sync to the GitHub mirror, wiki publishing, shared quality checks for Python and shell, for C and C++ and for C#, a release workflow, the publishing of accepted milestones and the repository's own validation. They are listed with their purpose and a diagram under [Workflows](#workflows).
|
It contains nine workflows: metadata sync to the GitHub mirror, wiki publishing (called by each repository), shared quality checks for Python and shell, for C and C++ and for C#, a release workflow, the publishing of accepted milestones and the repository's own validation. They are listed with their purpose and a diagram under [Workflows](#workflows).
|
||||||
|
|
||||||
|
|
||||||
## Workflows
|
## Workflows
|
||||||
|
|
||||||
Eight workflows live in this repository. A **scoped** workflow is delivered by the instance to every repository of the TirSystem organizations and needs nothing in the repository; a **reusable** workflow is called by a repository with `uses:`; the others run only here. The diagrams are PlantUML source.
|
Nine workflows live in this repository. A **scoped** workflow is delivered by the instance to every repository of the TirSystem organizations and needs nothing in the repository; a **reusable** workflow is called by a repository with `uses:`; the others run only here. The diagrams are PlantUML source.
|
||||||
|
|
||||||
| Workflow | File | Kind | Starts on | Purpose |
|
| Workflow | File | Kind | Starts on | Purpose |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
| Sync GitHub mirror metadata | [`sync-github-metadata.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/scoped_workflows/sync-github-metadata.yml) | Scoped | push to `main`, manual, daily 03:17 UTC | Copies the description and topics of a Gitea repository to its GitHub push mirror |
|
| Sync GitHub mirror metadata | [`sync-github-metadata.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/scoped_workflows/sync-github-metadata.yml) | Scoped | push to `main`, manual, daily 03:17 UTC | Copies the description and topics of a Gitea repository to its GitHub push mirror |
|
||||||
| Publish wiki | [`publish-wiki.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/scoped_workflows/publish-wiki.yml) | Scoped, opt-in with `wiki/.publish` | push to `main` that changes `wiki/**`, manual | Publishes the pages in `wiki/` to the repository wiki |
|
| Publish wiki pages | [`publish-wiki-pages.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/publish-wiki-pages.yml) | Reusable (`workflow_call`) | a call from another repository | Publishes the pages in `docs/wiki/` (or the folder named by `wiki_dir`) to the wiki of the calling repository |
|
||||||
| Quality checks | [`quality-checks.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks.yml) | Reusable (`workflow_call`) | a call from another repository | Runs ruff, mypy, shellcheck and shfmt on the tracked files and changes nothing |
|
| Quality checks | [`quality-checks.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks.yml) | Reusable (`workflow_call`) | a call from another repository | Runs ruff, mypy, shellcheck and shfmt on the tracked files and changes nothing |
|
||||||
| Quality checks C++ | [`quality-checks-cpp.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks-cpp.yml) | Reusable (`workflow_call`) | a call from another repository | Runs clang-format and clang-tidy at exact versions on the tracked C and C++ files and changes nothing |
|
| Quality checks C++ | [`quality-checks-cpp.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks-cpp.yml) | Reusable (`workflow_call`) | a call from another repository | Runs clang-format and clang-tidy at exact versions on the tracked C and C++ files and changes nothing |
|
||||||
| Quality checks C# | [`quality-checks-csharp.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks-csharp.yml) | Reusable (`workflow_call`) | a call from another repository | Runs `dotnet format` and `dotnet build` on an exact .NET SDK 10 or later and changes nothing |
|
| Quality checks C# | [`quality-checks-csharp.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks-csharp.yml) | Reusable (`workflow_call`) | a call from another repository | Runs `dotnet format` and `dotnet build` on an exact .NET SDK 10 or later and changes nothing |
|
||||||
|
| Publish own wiki | [`publish-own-wiki.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/publish-own-wiki.yml) | This repository only | push to `main` that changes `docs/wiki/**`, manual | Calls the reusable Publish wiki pages workflow for the wiki of this repository |
|
||||||
| Release | [`release.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/release.yml) | This repository only | manual | Creates the version tag, the release page and the major tag after the checks |
|
| Release | [`release.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/release.yml) | This repository only | manual | Creates the version tag, the release page and the major tag after the checks |
|
||||||
| Publish accepted milestones | [`sync-milestones.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/sync-milestones.yml) | This repository only | push to `main` that changes `docs/milestones/**` or `docs/sqa/reviews/**`, manual (dry run by default) | Creates or updates the Gitea milestone and issues of every milestone that is Accepted with a Go review |
|
| Publish accepted milestones | [`sync-milestones.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/sync-milestones.yml) | This repository only | push to `main` that changes `docs/milestones/**` or `docs/sqa/reviews/**`, manual (dry run by default) | Creates or updates the Gitea milestone and issues of every milestone that is Accepted with a Go review |
|
||||||
| Validate workflows | [`validate-workflows.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/validate-workflows.yml) | This repository only | pull request, push to `main`, manual | Parses every workflow and runs the offline tests |
|
| Validate workflows | [`validate-workflows.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/validate-workflows.yml) | This repository only | pull request, push to `main`, manual | Parses every workflow and runs the offline tests |
|
||||||
@@ -97,50 +98,6 @@ deactivate Workflow
|
|||||||
@enduml
|
@enduml
|
||||||
```
|
```
|
||||||
|
|
||||||
### Publish wiki
|
|
||||||
|
|
||||||
Publishes `wiki/` to the repository wiki, only in a repository that has opted in with `wiki/.publish`. The word `prune` in that file also deletes pages that are not in `wiki/`.
|
|
||||||
|
|
||||||
#### Workflow
|
|
||||||
|
|
||||||
```plantuml
|
|
||||||
@startuml
|
|
||||||
title Publish wiki/ to the repository wiki
|
|
||||||
|
|
||||||
autonumber
|
|
||||||
|
|
||||||
actor "Push to main that changes wiki/**,\nor manual trigger" as Trigger
|
|
||||||
participant "Gitea Actions\npublish-wiki" as Workflow
|
|
||||||
participant "shared-scripts\n(tools/publish_wiki.py at v1)" as Script
|
|
||||||
participant "Gitea wiki API" as Wiki
|
|
||||||
|
|
||||||
Trigger -> Workflow: Start workflow
|
|
||||||
activate Workflow
|
|
||||||
Workflow -> Script: Check out the repository and the script, run it
|
|
||||||
activate Script
|
|
||||||
|
|
||||||
alt wiki/.publish does not exist
|
|
||||||
Script --> Workflow: Log that publishing is not enabled and succeed\n(nothing is written)
|
|
||||||
else wiki/ has no Markdown pages
|
|
||||||
Script --> Workflow: Fail with [configuration]\n(an empty wiki/ never deletes pages)
|
|
||||||
else
|
|
||||||
Script -> Script: Read the marker (empty, or the word prune)\nand TOKEN_FOR_GITEA_WIKI
|
|
||||||
Script -> Wiki: GET repository (preflight)
|
|
||||||
Wiki --> Script: Wiki is enabled, token accepted
|
|
||||||
Script -> Wiki: GET pages
|
|
||||||
Wiki --> Script: Existing pages
|
|
||||||
Script -> Wiki: Create new pages, update changed pages
|
|
||||||
opt marker says prune
|
|
||||||
Script -> Wiki: Delete pages that are not in wiki/
|
|
||||||
end
|
|
||||||
Script --> Workflow: Log created, updated and deleted counts
|
|
||||||
end
|
|
||||||
deactivate Script
|
|
||||||
Workflow --> Trigger: Workflow result
|
|
||||||
deactivate Workflow
|
|
||||||
@enduml
|
|
||||||
```
|
|
||||||
|
|
||||||
### Quality checks
|
### Quality checks
|
||||||
|
|
||||||
A reusable workflow for Python and shell, called with `uses: TirSystem/github-action/.gitea/workflows/quality-checks.yml@v1` (see the [guide](QualityChecksPythonShell)).
|
A reusable workflow for Python and shell, called with `uses: TirSystem/github-action/.gitea/workflows/quality-checks.yml@v1` (see the [guide](QualityChecksPythonShell)).
|
||||||
@@ -326,6 +283,90 @@ deactivate Workflow
|
|||||||
@enduml
|
@enduml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Publish wiki pages
|
||||||
|
|
||||||
|
A reusable workflow (ADR-0009). A repository calls it from its own workflow, so the call is the opt-in and no marker file is needed. It publishes the Markdown pages of `wiki_dir` (default `docs/wiki`) to the wiki of the calling repository, and deletes pages that are not in the folder only when `prune` is `true`.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths: [ "docs/wiki/**" ]
|
||||||
|
jobs:
|
||||||
|
wiki:
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/publish-wiki-pages.yml@v1
|
||||||
|
secrets:
|
||||||
|
TOKEN_FOR_GITEA_WIKI: ${{ secrets.TOKEN_FOR_GITEA_WIKI }}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Workflow
|
||||||
|
|
||||||
|
```plantuml
|
||||||
|
@startuml
|
||||||
|
title Publish docs/wiki to the wiki of the calling repository
|
||||||
|
|
||||||
|
autonumber
|
||||||
|
|
||||||
|
actor "Calling repository\nuses: ...publish-wiki-pages.yml@v1" as Caller
|
||||||
|
participant "Gitea Actions\npublish-wiki-pages" as Workflow
|
||||||
|
participant "shared-scripts\n(tools/publish_wiki.py at tools-ref)" as Script
|
||||||
|
participant "Gitea wiki API" as Wiki
|
||||||
|
|
||||||
|
Caller -> Workflow: Call with wiki_dir, prune and the secret
|
||||||
|
activate Workflow
|
||||||
|
Workflow -> Script: Check out the repository and the script, run it
|
||||||
|
activate Script
|
||||||
|
|
||||||
|
alt wiki_dir does not exist, or has no Markdown pages
|
||||||
|
Script --> Workflow: Fail with [configuration]\n(an empty folder never deletes pages)
|
||||||
|
else
|
||||||
|
Script -> Script: Read prune and TOKEN_FOR_GITEA_WIKI
|
||||||
|
Script -> Wiki: GET repository (preflight)
|
||||||
|
Wiki --> Script: Wiki is enabled, token accepted
|
||||||
|
Script -> Wiki: GET pages
|
||||||
|
Wiki --> Script: Existing pages
|
||||||
|
Script -> Wiki: Create new pages, update changed pages
|
||||||
|
opt prune is true
|
||||||
|
Script -> Wiki: Delete pages that are not in wiki_dir
|
||||||
|
end
|
||||||
|
Script --> Workflow: Log created, updated and deleted counts
|
||||||
|
end
|
||||||
|
deactivate Script
|
||||||
|
Workflow --> Caller: Workflow result
|
||||||
|
deactivate Workflow
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
### Publish own wiki
|
||||||
|
|
||||||
|
The wiki of this repository is `docs/wiki/`. This workflow calls the reusable workflow above by its local path, with `prune` set to `true` so the wiki always equals the folder and `tools-ref` set to `main` so that the script of the same commit runs. It is the caller that a project copies from the framework's `templates/ci/publish-wiki.yml`.
|
||||||
|
|
||||||
|
#### Workflow
|
||||||
|
|
||||||
|
```plantuml
|
||||||
|
@startuml
|
||||||
|
title Publish the wiki of this repository (docs/wiki)
|
||||||
|
|
||||||
|
autonumber
|
||||||
|
|
||||||
|
actor "Push to main that changes docs/wiki/**,\nor manual trigger" as Trigger
|
||||||
|
participant "Gitea Actions\npublish-own-wiki" as Caller
|
||||||
|
participant "Gitea Actions\npublish-wiki-pages\n(called by its local path)" as Workflow
|
||||||
|
participant "Gitea wiki API" as Wiki
|
||||||
|
|
||||||
|
Trigger -> Caller: Start workflow
|
||||||
|
activate Caller
|
||||||
|
Caller -> Workflow: Call with wiki_dir docs/wiki, prune true,\ntools-ref main and TOKEN_FOR_GITEA_WIKI
|
||||||
|
activate Workflow
|
||||||
|
Workflow -> Wiki: Create, update and delete pages\nso the wiki equals docs/wiki
|
||||||
|
Wiki --> Workflow: Done
|
||||||
|
Workflow --> Caller: Workflow result
|
||||||
|
deactivate Workflow
|
||||||
|
Caller --> Trigger: Workflow result
|
||||||
|
deactivate Caller
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
### Publish accepted milestones
|
### Publish accepted milestones
|
||||||
|
|
||||||
Standing authorization to publish: on a push to `main` that changes the milestones or their reviews, every milestone whose latest Version History row is Accepted and whose latest review is a Go is created or updated on Gitea with its tasks as issues. Nothing is closed or deleted. A manual run is a dry run unless `dry_run` is switched off. It uses the secret `TOKEN_FOR_GITEA` and the `--accepted-only` rule of the mounted framework (v0.5.0 or later).
|
Standing authorization to publish: on a push to `main` that changes the milestones or their reviews, every milestone whose latest Version History row is Accepted and whose latest review is a Go is created or updated on Gitea with its tasks as issues. Nothing is closed or deleted. A manual run is a dry run unless `dry_run` is switched off. It uses the secret `TOKEN_FOR_GITEA` and the `--accepted-only` rule of the mounted framework (v0.5.0 or later).
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- translation of Home.md, source sha256 5751829e99af -->
|
<!-- translation of Home.md, source sha256 074ce16f3435 -->
|
||||||
|
|
||||||
> Ini ialah terjemahan [`Home`](Home). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
> Ini ialah terjemahan [`Home`](Home). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
||||||
|
|
||||||
@@ -13,20 +13,21 @@ Koleksi aliran kerja (workflow) Gitea Actions yang boleh digunakan semula untuk
|
|||||||
|
|
||||||
Repositori ini ialah koleksi pusat bagi automasi yang boleh digunakan semula untuk repositori TirSystem. Repositori utama berada di `git.tirsystem.com` (Gitea) dan dicerminkan dengan push ke GitHub.
|
Repositori ini ialah koleksi pusat bagi automasi yang boleh digunakan semula untuk repositori TirSystem. Repositori utama berada di `git.tirsystem.com` (Gitea) dan dicerminkan dengan push ke GitHub.
|
||||||
|
|
||||||
Ia mengandungi lapan aliran kerja: penyegerakan metadata ke cermin GitHub, penerbitan wiki, semakan kualiti bersama untuk Python dan shell, untuk C dan C++ serta untuk C#, aliran kerja keluaran, penerbitan pencapaian (milestone) yang diterima dan pengesahan repositori sendiri. Ia disenaraikan dengan tujuan dan rajah di bawah [Aliran kerja](#aliran-kerja).
|
Ia mengandungi sembilan aliran kerja: penyegerakan metadata ke cermin GitHub, penerbitan wiki (dipanggil oleh setiap repositori), semakan kualiti bersama untuk Python dan shell, untuk C dan C++ serta untuk C#, aliran kerja keluaran, penerbitan pencapaian (milestone) yang diterima dan pengesahan repositori sendiri. Ia disenaraikan dengan tujuan dan rajah di bawah [Aliran kerja](#aliran-kerja).
|
||||||
|
|
||||||
|
|
||||||
## Aliran kerja
|
## Aliran kerja
|
||||||
|
|
||||||
Terdapat lapan aliran kerja dalam repositori ini. Aliran kerja **scoped** dihantar oleh instans ke setiap repositori organisasi TirSystem dan tidak memerlukan apa-apa dalam repositori; aliran kerja **boleh guna semula** dipanggil oleh sebuah repositori dengan `uses:`; yang lain hanya berjalan di sini. Rajah ialah kod sumber PlantUML dan dalam bahasa Inggeris.
|
Terdapat sembilan aliran kerja dalam repositori ini. Aliran kerja **scoped** dihantar oleh instans ke setiap repositori organisasi TirSystem dan tidak memerlukan apa-apa dalam repositori; aliran kerja **boleh guna semula** dipanggil oleh sebuah repositori dengan `uses:`; yang lain hanya berjalan di sini. Rajah ialah kod sumber PlantUML dan dalam bahasa Inggeris.
|
||||||
|
|
||||||
| Aliran kerja | Fail | Jenis | Bermula apabila | Tujuan |
|
| Aliran kerja | Fail | Jenis | Bermula apabila | Tujuan |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
| Sync GitHub mirror metadata | [`sync-github-metadata.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/scoped_workflows/sync-github-metadata.yml) | Scoped | push ke `main`, manual, setiap hari 03:17 UTC | Menyalin penerangan dan topik repositori Gitea ke push mirror GitHub-nya |
|
| Sync GitHub mirror metadata | [`sync-github-metadata.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/scoped_workflows/sync-github-metadata.yml) | Scoped | push ke `main`, manual, setiap hari 03:17 UTC | Menyalin penerangan dan topik repositori Gitea ke push mirror GitHub-nya |
|
||||||
| Publish wiki | [`publish-wiki.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/scoped_workflows/publish-wiki.yml) | Scoped, pilih menyertai dengan `wiki/.publish` | push ke `main` yang mengubah `wiki/**`, manual | Menerbitkan halaman dalam `wiki/` ke wiki repositori |
|
| Publish wiki pages | [`publish-wiki-pages.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/publish-wiki-pages.yml) | Boleh guna semula (`workflow_call`) | panggilan daripada repositori lain | Menerbitkan halaman dalam `docs/wiki/` (atau folder yang dinamakan oleh `wiki_dir`) ke wiki repositori pemanggil |
|
||||||
| Quality checks | [`quality-checks.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks.yml) | Boleh guna semula (`workflow_call`) | panggilan daripada repositori lain | Menjalankan ruff, mypy, shellcheck dan shfmt pada fail yang dijejaki dan tidak mengubah apa-apa |
|
| Quality checks | [`quality-checks.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks.yml) | Boleh guna semula (`workflow_call`) | panggilan daripada repositori lain | Menjalankan ruff, mypy, shellcheck dan shfmt pada fail yang dijejaki dan tidak mengubah apa-apa |
|
||||||
| Quality checks C++ | [`quality-checks-cpp.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks-cpp.yml) | Boleh guna semula (`workflow_call`) | panggilan daripada repositori lain | Menjalankan clang-format dan clang-tidy pada versi tepat pada fail C dan C++ yang dijejaki dan tidak mengubah apa-apa |
|
| Quality checks C++ | [`quality-checks-cpp.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks-cpp.yml) | Boleh guna semula (`workflow_call`) | panggilan daripada repositori lain | Menjalankan clang-format dan clang-tidy pada versi tepat pada fail C dan C++ yang dijejaki dan tidak mengubah apa-apa |
|
||||||
| Quality checks C# | [`quality-checks-csharp.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks-csharp.yml) | Boleh guna semula (`workflow_call`) | panggilan daripada repositori lain | Menjalankan `dotnet format` dan `dotnet build` pada .NET SDK 10 atau lebih baharu yang tepat dan tidak mengubah apa-apa |
|
| Quality checks C# | [`quality-checks-csharp.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks-csharp.yml) | Boleh guna semula (`workflow_call`) | panggilan daripada repositori lain | Menjalankan `dotnet format` dan `dotnet build` pada .NET SDK 10 atau lebih baharu yang tepat dan tidak mengubah apa-apa |
|
||||||
|
| Publish own wiki | [`publish-own-wiki.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/publish-own-wiki.yml) | Repositori ini sahaja | push ke `main` yang mengubah `docs/wiki/**`, manual | Memanggil aliran kerja boleh guna semula Publish wiki pages untuk wiki repositori ini |
|
||||||
| Release | [`release.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/release.yml) | Repositori ini sahaja | manual | Mencipta tag versi, halaman keluaran dan tag major selepas semakan |
|
| Release | [`release.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/release.yml) | Repositori ini sahaja | manual | Mencipta tag versi, halaman keluaran dan tag major selepas semakan |
|
||||||
| Menerbitkan milestone yang diterima | [`sync-milestones.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/sync-milestones.yml) | Repositori ini sahaja | push ke `main` yang mengubah `docs/milestones/**` atau `docs/sqa/reviews/**`, manual (larian percubaan secara lalai) | Mencipta atau mengemas kini milestone Gitea dan isu bagi setiap milestone yang Accepted dengan semakan Go |
|
| Menerbitkan milestone yang diterima | [`sync-milestones.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/sync-milestones.yml) | Repositori ini sahaja | push ke `main` yang mengubah `docs/milestones/**` atau `docs/sqa/reviews/**`, manual (larian percubaan secara lalai) | Mencipta atau mengemas kini milestone Gitea dan isu bagi setiap milestone yang Accepted dengan semakan Go |
|
||||||
| Validate workflows | [`validate-workflows.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/validate-workflows.yml) | Repositori ini sahaja | pull request, push ke `main`, manual | Menghurai setiap aliran kerja sebagai YAML dan menjalankan ujian luar talian |
|
| Validate workflows | [`validate-workflows.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/validate-workflows.yml) | Repositori ini sahaja | pull request, push ke `main`, manual | Menghurai setiap aliran kerja sebagai YAML dan menjalankan ujian luar talian |
|
||||||
@@ -97,50 +98,6 @@ deactivate Workflow
|
|||||||
@enduml
|
@enduml
|
||||||
```
|
```
|
||||||
|
|
||||||
### Menerbitkan wiki
|
|
||||||
|
|
||||||
Menerbitkan `wiki/` ke wiki repositori, hanya dalam repositori yang telah menyertai dengan `wiki/.publish`. Perkataan `prune` dalam fail itu juga memadam halaman yang tiada dalam `wiki/`.
|
|
||||||
|
|
||||||
#### Aliran kerja
|
|
||||||
|
|
||||||
```plantuml
|
|
||||||
@startuml
|
|
||||||
title Publish wiki/ to the repository wiki
|
|
||||||
|
|
||||||
autonumber
|
|
||||||
|
|
||||||
actor "Push to main that changes wiki/**,\nor manual trigger" as Trigger
|
|
||||||
participant "Gitea Actions\npublish-wiki" as Workflow
|
|
||||||
participant "shared-scripts\n(tools/publish_wiki.py at v1)" as Script
|
|
||||||
participant "Gitea wiki API" as Wiki
|
|
||||||
|
|
||||||
Trigger -> Workflow: Start workflow
|
|
||||||
activate Workflow
|
|
||||||
Workflow -> Script: Check out the repository and the script, run it
|
|
||||||
activate Script
|
|
||||||
|
|
||||||
alt wiki/.publish does not exist
|
|
||||||
Script --> Workflow: Log that publishing is not enabled and succeed\n(nothing is written)
|
|
||||||
else wiki/ has no Markdown pages
|
|
||||||
Script --> Workflow: Fail with [configuration]\n(an empty wiki/ never deletes pages)
|
|
||||||
else
|
|
||||||
Script -> Script: Read the marker (empty, or the word prune)\nand TOKEN_FOR_GITEA_WIKI
|
|
||||||
Script -> Wiki: GET repository (preflight)
|
|
||||||
Wiki --> Script: Wiki is enabled, token accepted
|
|
||||||
Script -> Wiki: GET pages
|
|
||||||
Wiki --> Script: Existing pages
|
|
||||||
Script -> Wiki: Create new pages, update changed pages
|
|
||||||
opt marker says prune
|
|
||||||
Script -> Wiki: Delete pages that are not in wiki/
|
|
||||||
end
|
|
||||||
Script --> Workflow: Log created, updated and deleted counts
|
|
||||||
end
|
|
||||||
deactivate Script
|
|
||||||
Workflow --> Trigger: Workflow result
|
|
||||||
deactivate Workflow
|
|
||||||
@enduml
|
|
||||||
```
|
|
||||||
|
|
||||||
### Semakan kualiti
|
### Semakan kualiti
|
||||||
|
|
||||||
Aliran kerja boleh guna semula untuk Python dan shell, dipanggil dengan `uses: TirSystem/github-action/.gitea/workflows/quality-checks.yml@v1` (lihat [panduan](QualityChecksPythonShell)).
|
Aliran kerja boleh guna semula untuk Python dan shell, dipanggil dengan `uses: TirSystem/github-action/.gitea/workflows/quality-checks.yml@v1` (lihat [panduan](QualityChecksPythonShell)).
|
||||||
@@ -326,6 +283,90 @@ deactivate Workflow
|
|||||||
@enduml
|
@enduml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Menerbitkan halaman wiki
|
||||||
|
|
||||||
|
Aliran kerja boleh guna semula (ADR-0009). Sesebuah repositori memanggilnya daripada aliran kerjanya sendiri, jadi panggilan itu ialah pilihan menyertai dan tiada fail penanda diperlukan. Ia menerbitkan halaman Markdown dalam `wiki_dir` (lalai `docs/wiki`) ke wiki repositori pemanggil, dan memadam halaman yang tiada dalam folder hanya apabila `prune` ialah `true`.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths: [ "docs/wiki/**" ]
|
||||||
|
jobs:
|
||||||
|
wiki:
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/publish-wiki-pages.yml@v1
|
||||||
|
secrets:
|
||||||
|
TOKEN_FOR_GITEA_WIKI: ${{ secrets.TOKEN_FOR_GITEA_WIKI }}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Aliran kerja
|
||||||
|
|
||||||
|
```plantuml
|
||||||
|
@startuml
|
||||||
|
title Publish docs/wiki to the wiki of the calling repository
|
||||||
|
|
||||||
|
autonumber
|
||||||
|
|
||||||
|
actor "Calling repository\nuses: ...publish-wiki-pages.yml@v1" as Caller
|
||||||
|
participant "Gitea Actions\npublish-wiki-pages" as Workflow
|
||||||
|
participant "shared-scripts\n(tools/publish_wiki.py at tools-ref)" as Script
|
||||||
|
participant "Gitea wiki API" as Wiki
|
||||||
|
|
||||||
|
Caller -> Workflow: Call with wiki_dir, prune and the secret
|
||||||
|
activate Workflow
|
||||||
|
Workflow -> Script: Check out the repository and the script, run it
|
||||||
|
activate Script
|
||||||
|
|
||||||
|
alt wiki_dir does not exist, or has no Markdown pages
|
||||||
|
Script --> Workflow: Fail with [configuration]\n(an empty folder never deletes pages)
|
||||||
|
else
|
||||||
|
Script -> Script: Read prune and TOKEN_FOR_GITEA_WIKI
|
||||||
|
Script -> Wiki: GET repository (preflight)
|
||||||
|
Wiki --> Script: Wiki is enabled, token accepted
|
||||||
|
Script -> Wiki: GET pages
|
||||||
|
Wiki --> Script: Existing pages
|
||||||
|
Script -> Wiki: Create new pages, update changed pages
|
||||||
|
opt prune is true
|
||||||
|
Script -> Wiki: Delete pages that are not in wiki_dir
|
||||||
|
end
|
||||||
|
Script --> Workflow: Log created, updated and deleted counts
|
||||||
|
end
|
||||||
|
deactivate Script
|
||||||
|
Workflow --> Caller: Workflow result
|
||||||
|
deactivate Workflow
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
### Menerbitkan wiki sendiri
|
||||||
|
|
||||||
|
Wiki repositori ini ialah `docs/wiki/`. Aliran kerja ini memanggil aliran kerja boleh guna semula di atas melalui laluan tempatannya, dengan `prune` ditetapkan kepada `true` supaya wiki sentiasa sama dengan folder dan `tools-ref` ditetapkan kepada `main` supaya skrip daripada commit yang sama dijalankan. Ia ialah pemanggil yang disalin oleh projek daripada `templates/ci/publish-wiki.yml` framework.
|
||||||
|
|
||||||
|
#### Aliran kerja
|
||||||
|
|
||||||
|
```plantuml
|
||||||
|
@startuml
|
||||||
|
title Publish the wiki of this repository (docs/wiki)
|
||||||
|
|
||||||
|
autonumber
|
||||||
|
|
||||||
|
actor "Push to main that changes docs/wiki/**,\nor manual trigger" as Trigger
|
||||||
|
participant "Gitea Actions\npublish-own-wiki" as Caller
|
||||||
|
participant "Gitea Actions\npublish-wiki-pages\n(called by its local path)" as Workflow
|
||||||
|
participant "Gitea wiki API" as Wiki
|
||||||
|
|
||||||
|
Trigger -> Caller: Start workflow
|
||||||
|
activate Caller
|
||||||
|
Caller -> Workflow: Call with wiki_dir docs/wiki, prune true,\ntools-ref main and TOKEN_FOR_GITEA_WIKI
|
||||||
|
activate Workflow
|
||||||
|
Workflow -> Wiki: Create, update and delete pages\nso the wiki equals docs/wiki
|
||||||
|
Wiki --> Workflow: Done
|
||||||
|
Workflow --> Caller: Workflow result
|
||||||
|
deactivate Workflow
|
||||||
|
Caller --> Trigger: Workflow result
|
||||||
|
deactivate Caller
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
### Menerbitkan milestone yang diterima
|
### Menerbitkan milestone yang diterima
|
||||||
|
|
||||||
Kebenaran tetap untuk menerbitkan: pada push ke `main` yang mengubah milestone atau semakannya, setiap milestone yang baris terkini Version History-nya Accepted dan semakan terkininya Go dicipta atau dikemas kini di Gitea dengan tugasnya sebagai isu. Tiada apa-apa ditutup atau dipadam. Larian manual ialah larian percubaan kecuali `dry_run` dimatikan. Ia menggunakan secret `TOKEN_FOR_GITEA` dan peraturan `--accepted-only` framework yang dipasang (v0.5.0 atau lebih baharu).
|
Kebenaran tetap untuk menerbitkan: pada push ke `main` yang mengubah milestone atau semakannya, setiap milestone yang baris terkini Version History-nya Accepted dan semakan terkininya Go dicipta atau dikemas kini di Gitea dengan tugasnya sebagai isu. Tiada apa-apa ditutup atau dipadam. Larian manual ialah larian percubaan kecuali `dry_run` dimatikan. Ia menggunakan secret `TOKEN_FOR_GITEA` dan peraturan `--accepted-only` framework yang dipasang (v0.5.0 atau lebih baharu).
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- translation of Onboarding.md, source sha256 1d431898754e -->
|
<!-- translation of Onboarding.md, source sha256 1bc66efd5874 -->
|
||||||
|
|
||||||
> Dette er en oversættelse af [`Onboarding`](Onboarding). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
> Dette er en oversættelse af [`Onboarding`](Onboarding). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
||||||
|
|
||||||
@@ -32,16 +32,30 @@ Leveringen er automatisk, så et repository behøver ingen kopi af workflowet. S
|
|||||||
|
|
||||||
## Publicér en wiki (valgfrit)
|
## Publicér en wiki (valgfrit)
|
||||||
|
|
||||||
Workflowet **Publish wiki** kopierer Markdown-siderne i `wiki/` til repositoryets wiki, når en ændring af `wiki/` flettes til `main`. Det leveres som synkroniseringsworkflowet, men skriver kun, hvor et repository har meldt sig til.
|
Det genbrugelige workflow **Publish wiki pages** kopierer Markdown-siderne i `docs/wiki/` til repositoryets wiki, når en ændring af `docs/wiki/` flettes til `main`. Repositoryet kalder det, så der skrives intet, hvor der ikke findes et kald. Wikien findes som minimum på engelsk og på produktejerens sprog.
|
||||||
|
|
||||||
1. Aktivér wikien i repositoryets indstillinger.
|
1. Aktivér wikien i repositoryets indstillinger.
|
||||||
2. Tilføj Markdown-sider til `wiki/`. Filnavnet er sidens navn: `Home.md` er forsiden.
|
2. Tilføj Markdown-sider til `docs/wiki/`. Filnavnet er sidens navn: `Home.md` er forsiden. En bindestreg i navnet er et mellemrum i sidens navn: `Home-da.md` er siden "Home da", og et link til den er `[Dansk](Home-da)`.
|
||||||
3. Tilføj markøren `wiki/.publish`. Lad den være tom for kun at oprette og opdatere sider. Skriv det ene ord `prune` i den for også at slette wiki-sider, der ikke findes i `wiki/`, så wikien altid er lig med mappen.
|
3. Tilføj et workflow, for eksempel `.gitea/workflows/publish-wiki.yml`, der kalder det genbrugelige workflow:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths: [ "docs/wiki/**" ]
|
||||||
|
jobs:
|
||||||
|
wiki:
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/publish-wiki-pages.yml@v1
|
||||||
|
with:
|
||||||
|
prune: "true"
|
||||||
|
secrets:
|
||||||
|
TOKEN_FOR_GITEA_WIKI: ${{ secrets.TOKEN_FOR_GITEA_WIKI }}
|
||||||
|
```
|
||||||
|
|
||||||
|
`wiki_dir` er som standard `docs/wiki`. `prune: "true"` sletter også wiki-sider, der ikke findes i mappen, så wikien altid er lig med mappen; standarden `false` beholder dem.
|
||||||
4. Gem `TOKEN_FOR_GITEA_WIKI` som en secret i repositoryets organisation med det scope, der står i [credentials.md](Credentials.da).
|
4. Gem `TOKEN_FOR_GITEA_WIKI` som en secret i repositoryets organisation med det scope, der står i [credentials.md](Credentials.da).
|
||||||
5. Flet ændringen til `main`. Loggen skal slutte med `Published <n> page(s) to the wiki of <owner>/<repo>`.
|
5. Flet ændringen til `main`. Loggen skal slutte med `Published <n> page(s) to the wiki of <owner>/<repo>`.
|
||||||
|
|
||||||
Et repository uden `wiki/.publish` springes over med linjen `No wiki/.publish marker in <owner>/<repo>`: intet bliver skrevet, og der skal ingen secret til.
|
|
||||||
|
|
||||||
## Runners
|
## Runners
|
||||||
|
|
||||||
| Punkt | Værdi |
|
| Punkt | Værdi |
|
||||||
@@ -51,25 +51,40 @@ Delivery is automatic, so a repository needs no copy of the workflow. Secrets ar
|
|||||||
|
|
||||||
## Publish a wiki (optional)
|
## Publish a wiki (optional)
|
||||||
|
|
||||||
The **Publish wiki** workflow copies the Markdown pages in `wiki/` to the
|
The reusable workflow **Publish wiki pages** copies the Markdown pages in
|
||||||
repository wiki when a change to `wiki/` is merged to `main`. It is delivered
|
`docs/wiki/` to the repository wiki when a change to `docs/wiki/` is merged to
|
||||||
like the sync workflow, but it writes only where a repository opts in.
|
`main`. The repository calls it, so nothing is written where no call exists.
|
||||||
|
The wiki has English and the product owner's language as a minimum.
|
||||||
|
|
||||||
1. Enable the wiki in the repository settings.
|
1. Enable the wiki in the repository settings.
|
||||||
2. Add Markdown pages to `wiki/`. The file name is the page name: `Home.md` is
|
2. Add Markdown pages to `docs/wiki/`. The file name is the page name: `Home.md`
|
||||||
the home page.
|
is the home page. A hyphen in the name is a space in the page name:
|
||||||
3. Add the marker `wiki/.publish`. Leave it empty to create and update pages
|
`Home-da.md` is the page "Home da", and a link to it is `[Dansk](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/guides/Home-da)`.
|
||||||
only. Put the single word `prune` in it to also delete wiki pages that are
|
3. Add a workflow, for example `.gitea/workflows/publish-wiki.yml`, that calls
|
||||||
not in `wiki/`, so the wiki always equals the folder.
|
the reusable workflow:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths: [ "docs/wiki/**" ]
|
||||||
|
jobs:
|
||||||
|
wiki:
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/publish-wiki-pages.yml@v1
|
||||||
|
with:
|
||||||
|
prune: "true"
|
||||||
|
secrets:
|
||||||
|
TOKEN_FOR_GITEA_WIKI: ${{ secrets.TOKEN_FOR_GITEA_WIKI }}
|
||||||
|
```
|
||||||
|
|
||||||
|
`wiki_dir` defaults to `docs/wiki`. `prune: "true"` also deletes wiki pages
|
||||||
|
that are not in the folder, so the wiki always equals the folder; the
|
||||||
|
default `false` keeps them.
|
||||||
4. Store `TOKEN_FOR_GITEA_WIKI` as a secret of the repository's organization,
|
4. Store `TOKEN_FOR_GITEA_WIKI` as a secret of the repository's organization,
|
||||||
using the scope in [credentials.md](Credentials).
|
using the scope in [credentials.md](Credentials).
|
||||||
5. Merge the change to `main`. The log must end with `Published <n> page(s) to
|
5. Merge the change to `main`. The log must end with `Published <n> page(s) to
|
||||||
the wiki of <owner>/<repo>`.
|
the wiki of <owner>/<repo>`.
|
||||||
|
|
||||||
A repository without `wiki/.publish` is skipped with the line `No
|
|
||||||
wiki/.publish marker in <owner>/<repo>`: nothing is written and no secret is
|
|
||||||
needed.
|
|
||||||
|
|
||||||
## Runners
|
## Runners
|
||||||
|
|
||||||
| Item | Value |
|
| Item | Value |
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- translation of Onboarding.md, source sha256 1d431898754e -->
|
<!-- translation of Onboarding.md, source sha256 1bc66efd5874 -->
|
||||||
|
|
||||||
> Ini ialah terjemahan [`Onboarding`](Onboarding). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
> Ini ialah terjemahan [`Onboarding`](Onboarding). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
||||||
|
|
||||||
@@ -32,16 +32,30 @@ Penghantaran adalah automatik, jadi repositori tidak memerlukan salinan aliran k
|
|||||||
|
|
||||||
## Menerbitkan wiki (pilihan)
|
## Menerbitkan wiki (pilihan)
|
||||||
|
|
||||||
Aliran kerja **Publish wiki** menyalin halaman Markdown dalam `wiki/` ke wiki repositori apabila perubahan pada `wiki/` digabungkan ke `main`. Ia dihantar seperti aliran kerja penyegerakan, tetapi hanya menulis di tempat repositori telah memilih untuk menyertainya.
|
Aliran kerja boleh guna semula **Publish wiki pages** menyalin halaman Markdown dalam `docs/wiki/` ke wiki repositori apabila perubahan pada `docs/wiki/` digabungkan ke `main`. Repositori memanggilnya, jadi tiada apa-apa ditulis di tempat yang tiada panggilan. Wiki ada dalam bahasa Inggeris dan bahasa pemilik produk sekurang-kurangnya.
|
||||||
|
|
||||||
1. Aktifkan wiki dalam tetapan repositori.
|
1. Aktifkan wiki dalam tetapan repositori.
|
||||||
2. Tambah halaman Markdown ke `wiki/`. Nama fail ialah nama halaman: `Home.md` ialah halaman utama.
|
2. Tambah halaman Markdown ke `docs/wiki/`. Nama fail ialah nama halaman: `Home.md` ialah halaman utama. Tanda sempang dalam nama ialah ruang dalam nama halaman: `Home-da.md` ialah halaman "Home da", dan pautan kepadanya ialah `[Dansk](Home-da)`.
|
||||||
3. Tambah penanda `wiki/.publish`. Biarkan kosong untuk mencipta dan mengemas kini halaman sahaja. Letakkan satu perkataan `prune` di dalamnya untuk turut memadam halaman wiki yang tiada dalam `wiki/`, supaya wiki sentiasa sama dengan folder itu.
|
3. Tambah aliran kerja, contohnya `.gitea/workflows/publish-wiki.yml`, yang memanggil aliran kerja boleh guna semula:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths: [ "docs/wiki/**" ]
|
||||||
|
jobs:
|
||||||
|
wiki:
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/publish-wiki-pages.yml@v1
|
||||||
|
with:
|
||||||
|
prune: "true"
|
||||||
|
secrets:
|
||||||
|
TOKEN_FOR_GITEA_WIKI: ${{ secrets.TOKEN_FOR_GITEA_WIKI }}
|
||||||
|
```
|
||||||
|
|
||||||
|
`wiki_dir` lalai ialah `docs/wiki`. `prune: "true"` turut memadam halaman wiki yang tiada dalam folder itu, supaya wiki sentiasa sama dengan folder; lalai `false` mengekalkannya.
|
||||||
4. Simpan `TOKEN_FOR_GITEA_WIKI` sebagai secret organisasi repositori, dengan skop yang tertera dalam [credentials.md](Credentials.ms).
|
4. Simpan `TOKEN_FOR_GITEA_WIKI` sebagai secret organisasi repositori, dengan skop yang tertera dalam [credentials.md](Credentials.ms).
|
||||||
5. Gabungkan perubahan ke `main`. Log mesti berakhir dengan `Published <n> page(s) to the wiki of <owner>/<repo>`.
|
5. Gabungkan perubahan ke `main`. Log mesti berakhir dengan `Published <n> page(s) to the wiki of <owner>/<repo>`.
|
||||||
|
|
||||||
Repositori tanpa `wiki/.publish` dilangkau dengan baris `No wiki/.publish marker in <owner>/<repo>`: tiada apa-apa ditulis dan tiada secret diperlukan.
|
|
||||||
|
|
||||||
## Runners
|
## Runners
|
||||||
|
|
||||||
| Perkara | Nilai |
|
| Perkara | Nilai |
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
<!-- translation of QualityChecksCSharp.md, source sha256 36e34031e0b9 -->
|
||||||
|
|
||||||
|
> Dette er en oversættelse af [`QualityChecksCSharp`](QualityChecksCSharp). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
||||||
|
|
||||||
|
[English](QualityChecksCSharp) | Dansk | [Bahasa Melayu](QualityChecksCSharp.ms)
|
||||||
|
|
||||||
|
# Aflæsning af resultater fra kvalitetskontrol af C#
|
||||||
|
|
||||||
|
Sådan kalder en softwareudvikler den fælles kvalitetskontrol af C#, aflæser en mislykket kørsel og får den til at bestå. Workflowet kontrollerer formateringen og bygger en solution eller et projekt med advarsler som fejl, på et præcist .NET SDK i version 10 eller nyere, ændrer ingen fil og kræver ingen secret. Dets kontrakt er ADR-0008 i dette repository.
|
||||||
|
|
||||||
|
## Kald af workflowet
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Quality C#
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
quality:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/quality-checks-csharp.yml@v1
|
||||||
|
with:
|
||||||
|
project: src/App.sln
|
||||||
|
```
|
||||||
|
|
||||||
|
| Input | Standard | Betydning |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `working-directory` | `.` | Mappe, relativt til repositoryets rod, hvis filer kontrolleres |
|
||||||
|
| `project` | tom | Solution- eller projektfil, relativt til `working-directory`; tom bruger den eneste sporede `*.sln` eller `*.slnx`, ellers den eneste `*.csproj`, der er sporet dér |
|
||||||
|
| `dotnet-sdk-version` | `10.0.401` | Præcis version af .NET SDK, 10 eller nyere; en kanal som `10.0`, et interval og en version under 10 afvises |
|
||||||
|
| `tools-ref` | `v1` | Tag eller gren i `TirSystem/github-action`, hvorfra scriptet `tools/quality-checks-csharp.sh` hentes |
|
||||||
|
|
||||||
|
Henvis til workflowet ved major-tagget (`@v1`) eller et præcist tag, aldrig ved `main`. Et kald ved et præcist tag er kun fuldt fastlåst, når `tools-ref` angiver samme tag. Se opgraderingsvejledningen. SDK-versionen er præcis: at hæve standardværdien er en ny udgivelse af dette repository, ikke en stille ændring.
|
||||||
|
|
||||||
|
## Hvad repositoryet skal have
|
||||||
|
|
||||||
|
- En solution eller et projekt, der bygger med SDK'et. Flere kandidater kræver inputtet `project`; C#-filer uden solution eller projekt fejler med `[configuration]`.
|
||||||
|
- Netværk: `dotnet format` og `dotnet build` gendanner projektets NuGet-pakker i kørslen.
|
||||||
|
- Regler i `.editorconfig` (og de analysatorer, projektet slår til, for eksempel med `AnalysisLevel` og `EnforceCodeStyleInBuild`) afgør, hvad et fund er.
|
||||||
|
|
||||||
|
## Hvad der kontrolleres
|
||||||
|
|
||||||
|
| Filer | Værktøj | Hvad det melder |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| solutionen eller projektet | `dotnet format --verify-no-changes` | formatering og stil, der afviger fra `.editorconfig` |
|
||||||
|
| det samme | `dotnet build -warnaserror` | compiler- og analysatoradvarsler, som får bygningen til at fejle |
|
||||||
|
|
||||||
|
Usporede filer kontrolleres ikke. Et repository uden `*.cs`-filer består med en bemærkning. Projektets tests køres ikke.
|
||||||
|
|
||||||
|
## Aflæsning af en kørsel
|
||||||
|
|
||||||
|
1. Åbn statuskontrollen på pull requesten og derefter jobbet `quality-checks-csharp`.
|
||||||
|
2. Hvert værktøj har sin egen logggruppe. Begge kører, selv om det første fejlede, så én kørsel viser alle fund.
|
||||||
|
3. Et værktøj ender med `PASS <værktøj>` eller `FAIL <værktøj>`; sidste linje i en mislykket kørsel nævner dem: `Quality checks failed: dotnet format --verify-no-changes`.
|
||||||
|
4. Et fund skrives af værktøjet selv som `path(line,column): CODE message`. Stien er absolut i runnerens arbejdsområde (`/workspace/<owner>/<repo>/src/Program.cs(8,27)`).
|
||||||
|
|
||||||
|
## Typiske fejl og rettelser
|
||||||
|
|
||||||
|
| Værktøj | Hvad loggen viser | Rettelse |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `dotnet format --verify-no-changes` | `Program.cs(12,5): error WHITESPACE: Fix whitespace formatting` | Kør `dotnet format <projekt>`, og commit |
|
||||||
|
| `dotnet build -warnaserror` | `CS8602: Dereference of a possibly null reference` | Ret koden (null-kontrol); undertryk ikke advarslen uden en begrundelse |
|
||||||
|
| `dotnet build -warnaserror` | `IDE0005: Using directive is unnecessary` | Fjern direktivet |
|
||||||
|
|
||||||
|
For at gentage en kørsel på din egen maskine skal du bruge samme SDK:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dotnet --version # 10.0.401
|
||||||
|
dotnet format src/App.sln --verify-no-changes
|
||||||
|
dotnet build src/App.sln -warnaserror
|
||||||
|
```
|
||||||
|
|
||||||
|
## Når workflowet selv fejler
|
||||||
|
|
||||||
|
| Meddelelse | Årsag | Rettelse |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `[configuration] dotnet-sdk-version '<x>' is not an exact stable version 10 or later` | En kanal, et interval, en preview eller en version under 10 | Angiv en præcis version som `10.0.401` |
|
||||||
|
| `[configuration] working-directory must be a relative path inside the repository.` | En absolut sti eller `..` | Brug en sti inde i repositoryet |
|
||||||
|
| `[configuration] C# files exist but no solution or project was found` | Repositoryet har `*.cs`-filer og ingen `*.sln`, `*.slnx` eller `*.csproj` i arbejdsmappen | Tilføj en, eller sæt `working-directory` |
|
||||||
|
| `[configuration] Several solutions or projects were found` | Mere end én kandidat | Sæt inputtet `project` |
|
||||||
|
| Installationstrinnet fejler | `dot.net` eller runnerens netværk kan ikke nås | Kør jobbet igen; se [troubleshooting.md](troubleshooting.md) |
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
<!-- Generated from guides/quality-checks-csharp.md by tools/build_wiki.py. Edit the source, not this page. -->
|
||||||
|
|
||||||
|
> This page is generated from [`guides/quality-checks-csharp.md`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/guides/quality-checks-csharp.md). Changes made here are overwritten the next time the wiki is published.
|
||||||
|
|
||||||
|
English | [Dansk](QualityChecksCSharp.da) | [Bahasa Melayu](QualityChecksCSharp.ms)
|
||||||
|
|
||||||
|
# Reading C# quality-check results
|
||||||
|
|
||||||
|
How a software engineer calls the shared C# quality checks, reads a failed run
|
||||||
|
and makes it pass. The workflow checks the formatting and builds a solution or
|
||||||
|
project with warnings as errors, on an exact .NET SDK of version 10 or later,
|
||||||
|
changes no file and needs no secret. Its contract is ADR-0008 in this
|
||||||
|
repository.
|
||||||
|
|
||||||
|
## Calling the workflow
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Quality C#
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
quality:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/quality-checks-csharp.yml@v1
|
||||||
|
with:
|
||||||
|
project: src/App.sln
|
||||||
|
```
|
||||||
|
|
||||||
|
| Input | Default | Meaning |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `working-directory` | `.` | Directory, relative to the repository root, whose files are checked |
|
||||||
|
| `project` | empty | Solution or project file, relative to `working-directory`; empty uses the single `*.sln` or `*.slnx`, else the single `*.csproj`, that is tracked there |
|
||||||
|
| `dotnet-sdk-version` | `10.0.401` | Exact version of the .NET SDK, 10 or later; a channel such as `10.0`, a range and a version below 10 are refused |
|
||||||
|
| `tools-ref` | `v1` | Tag or branch of `TirSystem/github-action` from which the script `tools/quality-checks-csharp.sh` is fetched |
|
||||||
|
|
||||||
|
Reference the workflow at the major tag (`@v1`) or at an exact tag, never at
|
||||||
|
`main`. A call at an exact tag is pinned completely only when `tools-ref` names
|
||||||
|
the same tag. See the upgrade guide. The SDK version is exact: raising the
|
||||||
|
default is a new release of this repository, not a silent change.
|
||||||
|
|
||||||
|
## What the repository needs
|
||||||
|
|
||||||
|
- A solution or project that builds with the SDK. Several candidates need the
|
||||||
|
`project` input; C# files with no solution or project fail with
|
||||||
|
`[configuration]`.
|
||||||
|
- The network: `dotnet format` and `dotnet build` restore the NuGet packages of
|
||||||
|
the project in the run.
|
||||||
|
- Rules in `.editorconfig` (and the analyzers the project enables, for example
|
||||||
|
with `AnalysisLevel` and `EnforceCodeStyleInBuild`) decide what a finding is.
|
||||||
|
|
||||||
|
## What is checked
|
||||||
|
|
||||||
|
| Files | Tool | What it reports |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| the solution or project | `dotnet format --verify-no-changes` | formatting and style that differ from `.editorconfig` |
|
||||||
|
| the same | `dotnet build -warnaserror` | compiler and analyzer warnings, which fail the build |
|
||||||
|
|
||||||
|
Untracked files are not checked. A repository without `*.cs` files passes with
|
||||||
|
a notice. Project tests are not run.
|
||||||
|
|
||||||
|
## Reading a run
|
||||||
|
|
||||||
|
1. Open the status check on the pull request, then the job
|
||||||
|
`quality-checks-csharp`.
|
||||||
|
2. Each tool has its own log group. Both run even when the first failed, so one
|
||||||
|
run shows all findings.
|
||||||
|
3. A tool ends with `PASS <tool>` or `FAIL <tool>`; the last line of a failed
|
||||||
|
run names them:
|
||||||
|
`Quality checks failed: dotnet format --verify-no-changes`.
|
||||||
|
4. A finding is written by the tool itself as `path(line,column): CODE message`.
|
||||||
|
The path is absolute in the workspace of the runner
|
||||||
|
(`/workspace/<owner>/<repo>/src/Program.cs(8,27)`).
|
||||||
|
|
||||||
|
## Typical failures and fixes
|
||||||
|
|
||||||
|
| Tool | What the log shows | Fix |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `dotnet format --verify-no-changes` | `Program.cs(12,5): error WHITESPACE: Fix whitespace formatting` | Run `dotnet format <project>` and commit |
|
||||||
|
| `dotnet build -warnaserror` | `CS8602: Dereference of a possibly null reference` | Fix the code (null check), do not suppress the warning without a reason |
|
||||||
|
| `dotnet build -warnaserror` | `IDE0005: Using directive is unnecessary` | Remove the directive |
|
||||||
|
|
||||||
|
To reproduce a run on your machine, use the same SDK:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dotnet --version # 10.0.401
|
||||||
|
dotnet format src/App.sln --verify-no-changes
|
||||||
|
dotnet build src/App.sln -warnaserror
|
||||||
|
```
|
||||||
|
|
||||||
|
## When the workflow itself fails
|
||||||
|
|
||||||
|
| Message | Cause | Fix |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `[configuration] dotnet-sdk-version '<x>' is not an exact stable version 10 or later` | A channel, a range, a preview or a version below 10 | Give an exact version such as `10.0.401` |
|
||||||
|
| `[configuration] working-directory must be a relative path inside the repository.` | An absolute path or `..` | Use a path inside the repository |
|
||||||
|
| `[configuration] C# files exist but no solution or project was found` | The repository has `*.cs` files and no `*.sln`, `*.slnx` or `*.csproj` in the working directory | Add one, or set `working-directory` |
|
||||||
|
| `[configuration] Several solutions or projects were found` | More than one candidate | Set the input `project` |
|
||||||
|
| The install step fails | `dot.net` or the runner network is unreachable | Re-run the job; see [troubleshooting.md](Troubleshooting) |
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
<!-- translation of QualityChecksCSharp.md, source sha256 36e34031e0b9 -->
|
||||||
|
|
||||||
|
> Ini ialah terjemahan [`QualityChecksCSharp`](QualityChecksCSharp). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
||||||
|
|
||||||
|
[English](QualityChecksCSharp) | [Dansk](QualityChecksCSharp.da) | Bahasa Melayu
|
||||||
|
|
||||||
|
# Membaca keputusan semakan kualiti C#
|
||||||
|
|
||||||
|
Cara seorang jurutera perisian memanggil semakan kualiti bersama untuk C#, membaca larian yang gagal dan menjadikannya lulus. Aliran kerja ini menyemak pemformatan dan membina solution atau projek dengan amaran sebagai ralat, pada .NET SDK versi 10 atau lebih baharu yang tepat, tidak mengubah sebarang fail dan tidak memerlukan secret. Kontraknya ialah ADR-0008 dalam repositori ini.
|
||||||
|
|
||||||
|
## Memanggil aliran kerja
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Quality C#
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
quality:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/quality-checks-csharp.yml@v1
|
||||||
|
with:
|
||||||
|
project: src/App.sln
|
||||||
|
```
|
||||||
|
|
||||||
|
| Input | Lalai | Maksud |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `working-directory` | `.` | Direktori, relatif kepada akar repositori, yang failnya disemak |
|
||||||
|
| `project` | kosong | Fail solution atau projek, relatif kepada `working-directory`; kosong menggunakan satu-satunya `*.sln` atau `*.slnx` yang dijejaki, jika tiada maka satu-satunya `*.csproj` yang dijejaki di situ |
|
||||||
|
| `dotnet-sdk-version` | `10.0.401` | Versi tepat .NET SDK, 10 atau lebih baharu; saluran seperti `10.0`, julat dan versi di bawah 10 ditolak |
|
||||||
|
| `tools-ref` | `v1` | Tag atau cabang `TirSystem/github-action` tempat skrip `tools/quality-checks-csharp.sh` diambil |
|
||||||
|
|
||||||
|
Rujuk aliran kerja pada tag major (`@v1`) atau pada tag tepat, jangan sekali-kali pada `main`. Panggilan pada tag tepat hanya disematkan sepenuhnya apabila `tools-ref` menamakan tag yang sama. Lihat panduan naik taraf. Versi SDK adalah tepat: menaikkan nilai lalai ialah keluaran baharu repositori ini, bukan perubahan senyap.
|
||||||
|
|
||||||
|
## Apa yang diperlukan oleh repositori
|
||||||
|
|
||||||
|
- Satu solution atau projek yang boleh dibina dengan SDK. Beberapa calon memerlukan input `project`; fail C# tanpa solution atau projek gagal dengan `[configuration]`.
|
||||||
|
- Rangkaian: `dotnet format` dan `dotnet build` memulihkan pakej NuGet projek dalam larian.
|
||||||
|
- Peraturan dalam `.editorconfig` (dan penganalisis yang diaktifkan projek, contohnya dengan `AnalysisLevel` dan `EnforceCodeStyleInBuild`) menentukan apa yang dikira sebagai dapatan.
|
||||||
|
|
||||||
|
## Apa yang disemak
|
||||||
|
|
||||||
|
| Fail | Alat | Apa yang dilaporkan |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| solution atau projek | `dotnet format --verify-no-changes` | pemformatan dan gaya yang berbeza daripada `.editorconfig` |
|
||||||
|
| yang sama | `dotnet build -warnaserror` | amaran pengkompil dan penganalisis, yang menggagalkan binaan |
|
||||||
|
|
||||||
|
Fail yang tidak dijejaki tidak disemak. Repositori tanpa fail `*.cs` lulus dengan satu notis. Ujian projek tidak dijalankan.
|
||||||
|
|
||||||
|
## Membaca satu larian
|
||||||
|
|
||||||
|
1. Buka semakan status pada pull request, kemudian kerja `quality-checks-csharp`.
|
||||||
|
2. Setiap alat mempunyai kumpulan lognya sendiri. Kedua-duanya dijalankan walaupun yang pertama gagal, jadi satu larian menunjukkan semua dapatan.
|
||||||
|
3. Satu alat berakhir dengan `PASS <alat>` atau `FAIL <alat>`; baris terakhir larian yang gagal menamakannya: `Quality checks failed: dotnet format --verify-no-changes`.
|
||||||
|
4. Satu dapatan ditulis oleh alat itu sendiri sebagai `path(line,column): CODE message`. Laluan itu mutlak dalam ruang kerja runner (`/workspace/<owner>/<repo>/src/Program.cs(8,27)`).
|
||||||
|
|
||||||
|
## Kegagalan biasa dan pembetulan
|
||||||
|
|
||||||
|
| Alat | Apa yang ditunjukkan log | Pembetulan |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `dotnet format --verify-no-changes` | `Program.cs(12,5): error WHITESPACE: Fix whitespace formatting` | Jalankan `dotnet format <projek>` dan commit |
|
||||||
|
| `dotnet build -warnaserror` | `CS8602: Dereference of a possibly null reference` | Betulkan kod (semakan null); jangan tindas amaran tanpa sebab |
|
||||||
|
| `dotnet build -warnaserror` | `IDE0005: Using directive is unnecessary` | Buang arahan itu |
|
||||||
|
|
||||||
|
Untuk mengulangi satu larian pada mesin anda, gunakan SDK yang sama:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dotnet --version # 10.0.401
|
||||||
|
dotnet format src/App.sln --verify-no-changes
|
||||||
|
dotnet build src/App.sln -warnaserror
|
||||||
|
```
|
||||||
|
|
||||||
|
## Apabila aliran kerja itu sendiri gagal
|
||||||
|
|
||||||
|
| Mesej | Punca | Pembetulan |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `[configuration] dotnet-sdk-version '<x>' is not an exact stable version 10 or later` | Saluran, julat, pratonton atau versi di bawah 10 | Berikan versi tepat seperti `10.0.401` |
|
||||||
|
| `[configuration] working-directory must be a relative path inside the repository.` | Laluan mutlak atau `..` | Gunakan laluan di dalam repositori |
|
||||||
|
| `[configuration] C# files exist but no solution or project was found` | Repositori mempunyai fail `*.cs` tetapi tiada `*.sln`, `*.slnx` atau `*.csproj` dalam direktori kerja | Tambah satu, atau tetapkan `working-directory` |
|
||||||
|
| `[configuration] Several solutions or projects were found` | Lebih daripada satu calon | Tetapkan input `project` |
|
||||||
|
| Langkah pemasangan gagal | `dot.net` atau rangkaian runner tidak dapat dicapai | Jalankan semula kerja; lihat [troubleshooting.md](troubleshooting.md) |
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
<!-- translation of QualityChecksCpp.md, source sha256 6faa57183a11 -->
|
||||||
|
|
||||||
|
> Dette er en oversættelse af [`QualityChecksCpp`](QualityChecksCpp). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
||||||
|
|
||||||
|
[English](QualityChecksCpp) | Dansk | [Bahasa Melayu](QualityChecksCpp.ms)
|
||||||
|
|
||||||
|
# Aflæsning af resultater fra kvalitetskontrol af C og C++
|
||||||
|
|
||||||
|
Sådan kalder en softwareudvikler den fælles kvalitetskontrol af C og C++, aflæser en mislykket kørsel og får den til at bestå. Workflowet formatkontrollerer og analyserer statisk repositoryets C- og C++-filer med clang-værktøjer i præcise versioner, ændrer ingen fil og kræver ingen secret. Dets kontrakt er ADR-0008 i dette repository.
|
||||||
|
|
||||||
|
## Kald af workflowet
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Quality C++
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
quality:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/quality-checks-cpp.yml@v1
|
||||||
|
with:
|
||||||
|
std: c++20
|
||||||
|
```
|
||||||
|
|
||||||
|
| Input | Standard | Betydning |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `working-directory` | `.` | Mappe, relativt til repositoryets rod, hvis filer kontrolleres |
|
||||||
|
| `std` | `c++20` | C++-standard, som clang-tidy får, når der ikke er en compile-database, for eksempel `c++17` eller `gnu++20` |
|
||||||
|
| `compile-commands-dir` | tom | Mappe, relativt til repositoryets rod, med en `compile_commands.json`, som din pipeline har bygget før kaldet; når den er sat, bruger clang-tidy den og ignorerer `std` |
|
||||||
|
| `clang-format-version` | `23.1.3` | Præcis version af pakken clang-format |
|
||||||
|
| `clang-tidy-version` | `22.1.8` | Præcis version af pakken clang-tidy |
|
||||||
|
| `tools-ref` | `v1` | Tag eller gren i `TirSystem/github-action`, hvorfra scriptet `tools/quality-checks-cpp.sh` hentes |
|
||||||
|
|
||||||
|
Henvis til workflowet ved major-tagget (`@v1`) eller et præcist tag, aldrig ved `main`. Et kald ved et præcist tag er kun fuldt fastlåst, når `tools-ref` angiver samme tag. Se opgraderingsvejledningen. Værktøjsversionerne er præcise: en nyere version af et værktøj er en ny udgivelse af dette repository, ikke en stille ændring.
|
||||||
|
|
||||||
|
## Hvad repositoryet skal have
|
||||||
|
|
||||||
|
- En `.clang-format` i arbejdsmappen eller i en mappe over den, op til repositoryets rod. Uden en fejler kørslen med `[configuration]`, og intet værktøj kører.
|
||||||
|
- Eventuelt en `.clang-tidy` med projektets kontroller (for eksempel C++ Core Guidelines). Uden en kører workflowet compilerdiagnostik og den statiske analysator (`clang-diagnostic-*` og `clang-analyzer-*`), fordi clang-tidy selv ikke aktiverer nogen kontrol uden konfiguration.
|
||||||
|
- For præcise statiske kontroller en compile-database: byg den først (for eksempel `cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON`) og angiv `compile-commands-dir: build`. Workflowet bygger ikke dit projekt.
|
||||||
|
|
||||||
|
## Hvad der kontrolleres
|
||||||
|
|
||||||
|
| Filer | Værktøj | Hvad det melder |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| sporede `*.c`, `*.cc`, `*.cpp`, `*.cxx`, `*.h`, `*.hh`, `*.hpp`, `*.hxx` | `clang-format --dry-run -Werror` | formatering, der afviger fra `.clang-format` |
|
||||||
|
| de samme filer | `clang-tidy` | fund fra kontrollerne i `.clang-tidy` (eller fra `clang-diagnostic-*` og `clang-analyzer-*` uden en); `*.c`-filer kontrolleres som C17, de øvrige filer som C++-standarden i `std`; hvert fund er en fejl (`--warnings-as-errors=*`), så en advarsel får kørslen til at fejle |
|
||||||
|
|
||||||
|
Usporede filer kontrolleres ikke. Et repository uden disse filer består med en bemærkning. Der er ingen `cppcheck`: kun en gammel version findes som pakke, og gamle værktøjer køres ikke (ADR-0008).
|
||||||
|
|
||||||
|
## Aflæsning af en kørsel
|
||||||
|
|
||||||
|
1. Åbn statuskontrollen på pull requesten og derefter jobbet `quality-checks-cpp`.
|
||||||
|
2. Hvert værktøj har sin egen logggruppe. Alle værktøjer kører, selv om et tidligere fejlede, så én kørsel viser alle fund.
|
||||||
|
3. Et værktøj ender med `PASS <værktøj>` eller `FAIL <værktøj>`; sidste linje i en mislykket kørsel nævner dem: `Quality checks failed: clang-format`.
|
||||||
|
4. Et fund skrives af værktøjet selv som `path:line:column: message`. `clang-format` skriver stier relative til `working-directory`; `clang-tidy` skriver absolutte stier i runnerens arbejdsområde (`/workspace/<owner>/<repo>/main.cpp:5:18`).
|
||||||
|
|
||||||
|
## Typiske fejl og rettelser
|
||||||
|
|
||||||
|
| Værktøj | Hvad loggen viser | Rettelse |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `clang-format` | `code should be clang-formatted [-Wclang-format-violations]` | Kør `clang-format -i <fil>` med samme version, og commit |
|
||||||
|
| `clang-tidy` | `warning: ... [modernize-use-nullptr]` | Ret koden, eller slå kontrollen fra i `.clang-tidy` med en begrundelse |
|
||||||
|
| `clang-tidy` | `error: 'x.h' file not found` | Byg compile-databasen og sæt `compile-commands-dir`, eller tilføj include-stien til den |
|
||||||
|
|
||||||
|
For at gentage en kørsel på din egen maskine skal du installere de samme versioner:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 -m venv .qc
|
||||||
|
.qc/bin/pip install clang-format==23.1.3 clang-tidy==22.1.8
|
||||||
|
git ls-files '*.cpp' '*.hpp' | xargs .qc/bin/clang-format --dry-run -Werror
|
||||||
|
```
|
||||||
|
|
||||||
|
## Når workflowet selv fejler
|
||||||
|
|
||||||
|
| Meddelelse | Årsag | Rettelse |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `[configuration] std '<x>' is not a C++ standard` | `std` er ikke som `c++20` eller `gnu++20` | Ret inputtet |
|
||||||
|
| `[configuration] ... is not an exact version` | En værktøjsversion er et interval, en kanal eller tom | Angiv en præcis version som `23.1.3` |
|
||||||
|
| `[configuration] working-directory must be a relative path inside the repository.` | En absolut sti eller `..` | Brug en sti inde i repositoryet |
|
||||||
|
| `[configuration] No .clang-format found` | Projektet har ingen stilfil | Tilføj en `.clang-format` |
|
||||||
|
| `[configuration] compile-commands-dir '<x>' has no compile_commands.json` | Databasen blev ikke bygget før kaldet | Byg den i et tidligere trin i jobbet eller i et job, det afhænger af |
|
||||||
|
| Installationstrinnet fejler | PyPI eller runnerens netværk kan ikke nås | Kør jobbet igen; se [troubleshooting.md](troubleshooting.md) |
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
<!-- Generated from guides/quality-checks-cpp.md by tools/build_wiki.py. Edit the source, not this page. -->
|
||||||
|
|
||||||
|
> This page is generated from [`guides/quality-checks-cpp.md`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/guides/quality-checks-cpp.md). Changes made here are overwritten the next time the wiki is published.
|
||||||
|
|
||||||
|
English | [Dansk](QualityChecksCpp.da) | [Bahasa Melayu](QualityChecksCpp.ms)
|
||||||
|
|
||||||
|
# Reading C and C++ quality-check results
|
||||||
|
|
||||||
|
How a software engineer calls the shared C and C++ quality checks, reads a
|
||||||
|
failed run and makes it pass. The workflow format-checks and statically checks
|
||||||
|
the C and C++ files of a repository with clang tools at exact versions, changes
|
||||||
|
no file and needs no secret. Its contract is ADR-0008 in this repository.
|
||||||
|
|
||||||
|
## Calling the workflow
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Quality C++
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
quality:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/quality-checks-cpp.yml@v1
|
||||||
|
with:
|
||||||
|
std: c++20
|
||||||
|
```
|
||||||
|
|
||||||
|
| Input | Default | Meaning |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `working-directory` | `.` | Directory, relative to the repository root, whose files are checked |
|
||||||
|
| `std` | `c++20` | C++ standard given to clang-tidy when there is no compile database, such as `c++17` or `gnu++20` |
|
||||||
|
| `compile-commands-dir` | empty | Directory, relative to the repository root, with a `compile_commands.json` that your pipeline built before the call; when set, clang-tidy uses it and ignores `std` |
|
||||||
|
| `clang-format-version` | `23.1.3` | Exact version of the clang-format package |
|
||||||
|
| `clang-tidy-version` | `22.1.8` | Exact version of the clang-tidy package |
|
||||||
|
| `tools-ref` | `v1` | Tag or branch of `TirSystem/github-action` from which the script `tools/quality-checks-cpp.sh` is fetched |
|
||||||
|
|
||||||
|
Reference the workflow at the major tag (`@v1`) or at an exact tag, never at
|
||||||
|
`main`. A call at an exact tag is pinned completely only when `tools-ref` names
|
||||||
|
the same tag. See the upgrade guide. The tool versions are exact: a newer
|
||||||
|
version of a tool is a new release of this repository, not a silent change.
|
||||||
|
|
||||||
|
## What the repository needs
|
||||||
|
|
||||||
|
- A `.clang-format` in the working directory or in a directory above it, up to
|
||||||
|
the top of the repository. Without one the run fails with `[configuration]`
|
||||||
|
and no tool runs.
|
||||||
|
- Optionally a `.clang-tidy` with the checks of the project (for example the
|
||||||
|
C++ Core Guidelines). Without one the workflow runs the compiler diagnostics
|
||||||
|
and the static analyzer (`clang-diagnostic-*` and `clang-analyzer-*`),
|
||||||
|
because clang-tidy itself enables no check when there is no configuration.
|
||||||
|
- For precise static checks, a compile database: build it first (for example
|
||||||
|
`cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON`) and pass
|
||||||
|
`compile-commands-dir: build`. The workflow does not build your project.
|
||||||
|
|
||||||
|
## What is checked
|
||||||
|
|
||||||
|
| Files | Tool | What it reports |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| tracked `*.c`, `*.cc`, `*.cpp`, `*.cxx`, `*.h`, `*.hh`, `*.hpp`, `*.hxx` | `clang-format --dry-run -Werror` | formatting that differs from `.clang-format` |
|
||||||
|
| the same files | `clang-tidy` | findings of the checks of `.clang-tidy` (or of `clang-diagnostic-*` and `clang-analyzer-*` without one); `*.c` files are checked as C17, the other files as the C++ standard of `std`; every finding is an error (`--warnings-as-errors=*`), so a warning fails the run |
|
||||||
|
|
||||||
|
Untracked files are not checked. A repository without these files passes with a
|
||||||
|
notice. There is no `cppcheck`: only an old version of it is available as a
|
||||||
|
package, and old tools are not run (ADR-0008).
|
||||||
|
|
||||||
|
## Reading a run
|
||||||
|
|
||||||
|
1. Open the status check on the pull request, then the job `quality-checks-cpp`.
|
||||||
|
2. Each tool has its own log group. Every tool runs even when an earlier one
|
||||||
|
failed, so one run shows all findings.
|
||||||
|
3. A tool ends with `PASS <tool>` or `FAIL <tool>`; the last line of a failed
|
||||||
|
run names them: `Quality checks failed: clang-format`.
|
||||||
|
4. A finding is written by the tool itself as `path:line:column: message`.
|
||||||
|
`clang-format` prints paths relative to `working-directory`; `clang-tidy`
|
||||||
|
prints absolute paths in the workspace of the runner
|
||||||
|
(`/workspace/<owner>/<repo>/main.cpp:5:18`).
|
||||||
|
|
||||||
|
## Typical failures and fixes
|
||||||
|
|
||||||
|
| Tool | What the log shows | Fix |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `clang-format` | `code should be clang-formatted [-Wclang-format-violations]` | Run `clang-format -i <file>` with the same version and commit |
|
||||||
|
| `clang-tidy` | `warning: ... [modernize-use-nullptr]` | Fix the code, or switch the check off in `.clang-tidy` with a reason |
|
||||||
|
| `clang-tidy` | `error: 'x.h' file not found` | Build the compile database and set `compile-commands-dir`, or add the include path to it |
|
||||||
|
|
||||||
|
To reproduce a run on your machine, install the same versions:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 -m venv .qc
|
||||||
|
.qc/bin/pip install clang-format==23.1.3 clang-tidy==22.1.8
|
||||||
|
git ls-files '*.cpp' '*.hpp' | xargs .qc/bin/clang-format --dry-run -Werror
|
||||||
|
```
|
||||||
|
|
||||||
|
## When the workflow itself fails
|
||||||
|
|
||||||
|
| Message | Cause | Fix |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `[configuration] std '<x>' is not a C++ standard` | `std` is not like `c++20` or `gnu++20` | Correct the input |
|
||||||
|
| `[configuration] ... is not an exact version` | A tool version is a range, a channel or empty | Give an exact version such as `23.1.3` |
|
||||||
|
| `[configuration] working-directory must be a relative path inside the repository.` | An absolute path or `..` | Use a path inside the repository |
|
||||||
|
| `[configuration] No .clang-format found` | The project has no style file | Add a `.clang-format` |
|
||||||
|
| `[configuration] compile-commands-dir '<x>' has no compile_commands.json` | The database was not built before the call | Build it in an earlier step of the job or in a job it depends on |
|
||||||
|
| The install step fails | PyPI or the runner network is unreachable | Re-run the job; see [troubleshooting.md](Troubleshooting) |
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
<!-- translation of QualityChecksCpp.md, source sha256 6faa57183a11 -->
|
||||||
|
|
||||||
|
> Ini ialah terjemahan [`QualityChecksCpp`](QualityChecksCpp). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
||||||
|
|
||||||
|
[English](QualityChecksCpp) | [Dansk](QualityChecksCpp.da) | Bahasa Melayu
|
||||||
|
|
||||||
|
# Membaca keputusan semakan kualiti C dan C++
|
||||||
|
|
||||||
|
Cara seorang jurutera perisian memanggil semakan kualiti bersama untuk C dan C++, membaca larian yang gagal dan menjadikannya lulus. Aliran kerja ini menyemak format dan menganalisis secara statik fail C dan C++ sesebuah repositori dengan alat clang pada versi yang tepat, tidak mengubah sebarang fail dan tidak memerlukan secret. Kontraknya ialah ADR-0008 dalam repositori ini.
|
||||||
|
|
||||||
|
## Memanggil aliran kerja
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Quality C++
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
quality:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/quality-checks-cpp.yml@v1
|
||||||
|
with:
|
||||||
|
std: c++20
|
||||||
|
```
|
||||||
|
|
||||||
|
| Input | Lalai | Maksud |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `working-directory` | `.` | Direktori, relatif kepada akar repositori, yang failnya disemak |
|
||||||
|
| `std` | `c++20` | Piawaian C++ yang diberikan kepada clang-tidy apabila tiada pangkalan data kompilasi, seperti `c++17` atau `gnu++20` |
|
||||||
|
| `compile-commands-dir` | kosong | Direktori, relatif kepada akar repositori, dengan `compile_commands.json` yang dibina oleh saluran paip anda sebelum panggilan; apabila ditetapkan, clang-tidy menggunakannya dan mengabaikan `std` |
|
||||||
|
| `clang-format-version` | `23.1.3` | Versi tepat pakej clang-format |
|
||||||
|
| `clang-tidy-version` | `22.1.8` | Versi tepat pakej clang-tidy |
|
||||||
|
| `tools-ref` | `v1` | Tag atau cabang `TirSystem/github-action` tempat skrip `tools/quality-checks-cpp.sh` diambil |
|
||||||
|
|
||||||
|
Rujuk aliran kerja pada tag major (`@v1`) atau pada tag tepat, jangan sekali-kali pada `main`. Panggilan pada tag tepat hanya disematkan sepenuhnya apabila `tools-ref` menamakan tag yang sama. Lihat panduan naik taraf. Versi alat adalah tepat: versi alat yang lebih baharu ialah keluaran baharu repositori ini, bukan perubahan senyap.
|
||||||
|
|
||||||
|
## Apa yang diperlukan oleh repositori
|
||||||
|
|
||||||
|
- Satu `.clang-format` dalam direktori kerja atau dalam direktori di atasnya, sehingga akar repositori. Tanpanya larian gagal dengan `[configuration]` dan tiada alat dijalankan.
|
||||||
|
- Pilihan: satu `.clang-tidy` dengan semakan projek (contohnya C++ Core Guidelines). Tanpanya aliran kerja menjalankan diagnostik pengkompil dan penganalisis statik (`clang-diagnostic-*` dan `clang-analyzer-*`), kerana clang-tidy sendiri tidak mengaktifkan sebarang semakan tanpa konfigurasi.
|
||||||
|
- Untuk semakan statik yang tepat, satu pangkalan data kompilasi: bina dahulu (contohnya `cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON`) dan berikan `compile-commands-dir: build`. Aliran kerja tidak membina projek anda.
|
||||||
|
|
||||||
|
## Apa yang disemak
|
||||||
|
|
||||||
|
| Fail | Alat | Apa yang dilaporkan |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `*.c`, `*.cc`, `*.cpp`, `*.cxx`, `*.h`, `*.hh`, `*.hpp`, `*.hxx` yang dijejaki | `clang-format --dry-run -Werror` | pemformatan yang berbeza daripada `.clang-format` |
|
||||||
|
| fail yang sama | `clang-tidy` | dapatan semakan dalam `.clang-tidy` (atau `clang-diagnostic-*` dan `clang-analyzer-*` tanpanya); fail `*.c` disemak sebagai C17, fail lain sebagai piawaian C++ dalam `std`; setiap dapatan ialah ralat (`--warnings-as-errors=*`), jadi amaran menggagalkan larian |
|
||||||
|
|
||||||
|
Fail yang tidak dijejaki tidak disemak. Repositori tanpa fail ini lulus dengan satu notis. Tiada `cppcheck`: hanya versi lama tersedia sebagai pakej, dan alat lama tidak dijalankan (ADR-0008).
|
||||||
|
|
||||||
|
## Membaca satu larian
|
||||||
|
|
||||||
|
1. Buka semakan status pada pull request, kemudian kerja `quality-checks-cpp`.
|
||||||
|
2. Setiap alat mempunyai kumpulan lognya sendiri. Setiap alat dijalankan walaupun yang terdahulu gagal, jadi satu larian menunjukkan semua dapatan.
|
||||||
|
3. Satu alat berakhir dengan `PASS <alat>` atau `FAIL <alat>`; baris terakhir larian yang gagal menamakannya: `Quality checks failed: clang-format`.
|
||||||
|
4. Satu dapatan ditulis oleh alat itu sendiri sebagai `path:line:column: message`. `clang-format` menulis laluan relatif kepada `working-directory`; `clang-tidy` menulis laluan mutlak dalam ruang kerja runner (`/workspace/<owner>/<repo>/main.cpp:5:18`).
|
||||||
|
|
||||||
|
## Kegagalan biasa dan pembetulan
|
||||||
|
|
||||||
|
| Alat | Apa yang ditunjukkan log | Pembetulan |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `clang-format` | `code should be clang-formatted [-Wclang-format-violations]` | Jalankan `clang-format -i <fail>` dengan versi yang sama dan commit |
|
||||||
|
| `clang-tidy` | `warning: ... [modernize-use-nullptr]` | Betulkan kod, atau matikan semakan itu dalam `.clang-tidy` dengan sebab |
|
||||||
|
| `clang-tidy` | `error: 'x.h' file not found` | Bina pangkalan data kompilasi dan tetapkan `compile-commands-dir`, atau tambah laluan include kepadanya |
|
||||||
|
|
||||||
|
Untuk mengulangi satu larian pada mesin anda, pasang versi yang sama:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 -m venv .qc
|
||||||
|
.qc/bin/pip install clang-format==23.1.3 clang-tidy==22.1.8
|
||||||
|
git ls-files '*.cpp' '*.hpp' | xargs .qc/bin/clang-format --dry-run -Werror
|
||||||
|
```
|
||||||
|
|
||||||
|
## Apabila aliran kerja itu sendiri gagal
|
||||||
|
|
||||||
|
| Mesej | Punca | Pembetulan |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `[configuration] std '<x>' is not a C++ standard` | `std` bukan seperti `c++20` atau `gnu++20` | Betulkan input |
|
||||||
|
| `[configuration] ... is not an exact version` | Versi alat ialah julat, saluran atau kosong | Berikan versi tepat seperti `23.1.3` |
|
||||||
|
| `[configuration] working-directory must be a relative path inside the repository.` | Laluan mutlak atau `..` | Gunakan laluan di dalam repositori |
|
||||||
|
| `[configuration] No .clang-format found` | Projek tiada fail gaya | Tambah `.clang-format` |
|
||||||
|
| `[configuration] compile-commands-dir '<x>' has no compile_commands.json` | Pangkalan data tidak dibina sebelum panggilan | Bina dalam langkah terdahulu kerja itu atau dalam kerja yang menjadi tanggungannya |
|
||||||
|
| Langkah pemasangan gagal | PyPI atau rangkaian runner tidak dapat dicapai | Jalankan semula kerja; lihat [troubleshooting.md](troubleshooting.md) |
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- translation of Troubleshooting.md, source sha256 eb63f4109a0d -->
|
<!-- translation of Troubleshooting.md, source sha256 cad6363616e8 -->
|
||||||
|
|
||||||
> Dette er en oversættelse af [`Troubleshooting`](Troubleshooting). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
> Dette er en oversættelse af [`Troubleshooting`](Troubleshooting). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
||||||
|
|
||||||
@@ -30,11 +30,12 @@ Kategorien fortæller, hvor du skal kigge. En fejl uden for scriptet (jobbet sta
|
|||||||
| `TOKEN_FOR_GITEA is missing or empty.` | configuration | Tilføj secreten |
|
| `TOKEN_FOR_GITEA is missing or empty.` | configuration | Tilføj secreten |
|
||||||
| `Could not determine the Gitea source repository.` | configuration | Kørslen har intet repositorynavn; meld det som en defekt |
|
| `Could not determine the Gitea source repository.` | configuration | Kørslen har intet repositorynavn; meld det som en defekt |
|
||||||
| `Expected at most one GitHub push mirror ... found N` | configuration | Behold ét GitHub push-spejl |
|
| `Expected at most one GitHub push mirror ... found N` | configuration | Behold ét GitHub push-spejl |
|
||||||
| `TOKEN_FOR_GITEA_WIKI is missing or empty.` | configuration | Kun wiki-publicering: repositoryet har meldt sig til med `wiki/.publish`, men dets organisation har ingen sådan secret; gem den (se [credentials.md](Credentials.da)) |
|
| `TOKEN_FOR_GITEA_WIKI is missing or empty.` | configuration | Kun wiki-publicering: repositoryet kalder workflowet, men dets organisation har ingen sådan secret, eller kaldet sender den ikke; gem den og send den i `secrets:` (se [credentials.md](Credentials.da)) |
|
||||||
| `wiki/.publish may only be empty or contain the word 'prune'.` | configuration | Kun wiki-publicering: lad markøren være tom, eller skriv kun ordet `prune` i den |
|
| `The prune input must be 'true' or 'false'` | configuration | Kun wiki-publicering: sæt `prune` i kaldet til `"true"` eller `"false"` |
|
||||||
|
| `The wiki folder ... does not exist` | configuration | Kun wiki-publicering: sæt `wiki_dir` i kaldet til mappen med siderne (standard `docs/wiki`) |
|
||||||
| `... HTTP 403 ...` ved publicering af wikien | permissions | Kun wiki-publicering: tokenet skal have `write:repository` og skriveadgang til dette repository |
|
| `... HTTP 403 ...` ved publicering af wikien | permissions | Kun wiki-publicering: tokenet skal have `write:repository` og skriveadgang til dette repository |
|
||||||
| `The wiki is not enabled on <repo>` | configuration | Kun wiki-publicering: aktivér wikien i repositoryets indstillinger |
|
| `The wiki is not enabled on <repo>` | configuration | Kun wiki-publicering: aktivér wikien i repositoryets indstillinger |
|
||||||
| `The wiki source directory ... has no Markdown pages` | configuration | Kun wiki-publicering: `wiki/` er tom eller mangler; intet blev ændret |
|
| `The wiki source directory ... has no Markdown pages` | configuration | Kun wiki-publicering: mappen har ingen Markdown-sider; intet blev ændret |
|
||||||
| `Could not determine the GitHub owner and repository ...` | configuration | Spejlets adresse skal se ud som `https://github.com/<owner>/<repo>.git` |
|
| `Could not determine the GitHub owner and repository ...` | configuration | Spejlets adresse skal se ud som `https://github.com/<owner>/<repo>.git` |
|
||||||
| `Gitea API request failed with HTTP 401` | credentials | Opret et nyt Gitea-token, og opdatér `TOKEN_FOR_GITEA` |
|
| `Gitea API request failed with HTTP 401` | credentials | Opret et nyt Gitea-token, og opdatér `TOKEN_FOR_GITEA` |
|
||||||
| `GitHub API request failed with HTTP 401` | credentials | Opret et nyt GitHub-token, og opdatér `PAT_FOR_GITHUB`; værdien skal kun være tokenet (intet navn, ingen anførselstegn eller JSON) |
|
| `GitHub API request failed with HTTP 401` | credentials | Opret et nyt GitHub-token, og opdatér `PAT_FOR_GITHUB`; værdien skal kun være tokenet (intet navn, ingen anførselstegn eller JSON) |
|
||||||
@@ -51,9 +52,7 @@ Kategorien fortæller, hvor du skal kigge. En fejl uden for scriptet (jobbet sta
|
|||||||
|
|
||||||
`WARNING: Gitea returned an invalid push mirror list; GitHub metadata was not synced.` Kørslen lykkes, men intet blev synkroniseret. Kontroller, at Gitea-versionen understøtter push mirror-API'et, og kør igen.
|
`WARNING: Gitea returned an invalid push mirror list; GitHub metadata was not synced.` Kørslen lykkes, men intet blev synkroniseret. Kontroller, at Gitea-versionen understøtter push mirror-API'et, og kør igen.
|
||||||
|
|
||||||
`No wiki/.publish marker in <owner>/<repo>; wiki publishing is not enabled for this repository.` Kørslen af Publish wiki lykkes og skriver intet. Repositoryet har ikke meldt sig til; tilføj `wiki/.publish`, hvis det skal publicere.
|
`<n> page(s) are in the wiki but not in <folder>/ and were kept; set the prune input to true to delete them.` Kørslen lykkes. Sider, der kun findes i wikien, lades i fred, medmindre kaldet sætter `prune: "true"`.
|
||||||
|
|
||||||
`<n> page(s) are in the wiki but not in wiki/ and were kept; put the word 'prune' in wiki/.publish to delete them.` Kørslen lykkes. Sider, der kun findes i wikien, lades i fred, medmindre markøren indeholder `prune`.
|
|
||||||
|
|
||||||
## Runner-problemer
|
## Runner-problemer
|
||||||
|
|
||||||
@@ -32,11 +32,12 @@ never starts, or stops before the step) is a **runner** problem.
|
|||||||
| `TOKEN_FOR_GITEA is missing or empty.` | configuration | Add the secret |
|
| `TOKEN_FOR_GITEA is missing or empty.` | configuration | Add the secret |
|
||||||
| `Could not determine the Gitea source repository.` | configuration | The run has no repository name; report as a defect |
|
| `Could not determine the Gitea source repository.` | configuration | The run has no repository name; report as a defect |
|
||||||
| `Expected at most one GitHub push mirror ... found N` | configuration | Keep one GitHub push mirror |
|
| `Expected at most one GitHub push mirror ... found N` | configuration | Keep one GitHub push mirror |
|
||||||
| `TOKEN_FOR_GITEA_WIKI is missing or empty.` | configuration | Wiki publishing only: the repository opted in with `wiki/.publish` but its organization has no such secret; store it (see [credentials.md](Credentials)) |
|
| `TOKEN_FOR_GITEA_WIKI is missing or empty.` | configuration | Wiki publishing only: the repository calls the workflow but its organization has no such secret, or the call does not pass it; store it and pass it in `secrets:` (see [credentials.md](Credentials)) |
|
||||||
| `wiki/.publish may only be empty or contain the word 'prune'.` | configuration | Wiki publishing only: leave the marker empty, or put only the word `prune` in it |
|
| `The prune input must be 'true' or 'false'` | configuration | Wiki publishing only: set `prune` in the call to `"true"` or `"false"` |
|
||||||
|
| `The wiki folder ... does not exist` | configuration | Wiki publishing only: set `wiki_dir` in the call to the folder with the pages (default `docs/wiki`) |
|
||||||
| `... HTTP 403 ...` while publishing the wiki | permissions | Wiki publishing only: the token needs `write:repository` and write access to this repository |
|
| `... HTTP 403 ...` while publishing the wiki | permissions | Wiki publishing only: the token needs `write:repository` and write access to this repository |
|
||||||
| `The wiki is not enabled on <repo>` | configuration | Wiki publishing only: enable the wiki in the repository settings |
|
| `The wiki is not enabled on <repo>` | configuration | Wiki publishing only: enable the wiki in the repository settings |
|
||||||
| `The wiki source directory ... has no Markdown pages` | configuration | Wiki publishing only: `wiki/` is empty or missing; nothing was changed |
|
| `The wiki source directory ... has no Markdown pages` | configuration | Wiki publishing only: the folder has no Markdown pages; nothing was changed |
|
||||||
| `Could not determine the GitHub owner and repository ...` | configuration | The mirror address must look like `https://github.com/<owner>/<repo>.git` |
|
| `Could not determine the GitHub owner and repository ...` | configuration | The mirror address must look like `https://github.com/<owner>/<repo>.git` |
|
||||||
| `Gitea API request failed with HTTP 401` | credentials | Create a new Gitea token and update `TOKEN_FOR_GITEA` |
|
| `Gitea API request failed with HTTP 401` | credentials | Create a new Gitea token and update `TOKEN_FOR_GITEA` |
|
||||||
| `GitHub API request failed with HTTP 401` | credentials | Create a new GitHub token and update `PAT_FOR_GITHUB`; the value must be the token only (no name, quotes or JSON) |
|
| `GitHub API request failed with HTTP 401` | credentials | Create a new GitHub token and update `PAT_FOR_GITHUB`; the value must be the token only (no name, quotes or JSON) |
|
||||||
@@ -58,13 +59,9 @@ settings.
|
|||||||
synced.` The run succeeds but nothing was synced. Check that the Gitea
|
synced.` The run succeeds but nothing was synced. Check that the Gitea
|
||||||
version supports the push mirror API and re-run.
|
version supports the push mirror API and re-run.
|
||||||
|
|
||||||
`No wiki/.publish marker in <owner>/<repo>; wiki publishing is not enabled for
|
`<n> page(s) are in the wiki but not in <folder>/ and were kept; set the prune
|
||||||
this repository.` The Publish wiki run succeeds and writes nothing. The
|
input to true to delete them.` The run succeeds. Pages that exist only in the
|
||||||
repository has not opted in; add `wiki/.publish` if it should publish.
|
wiki are left alone unless the call sets `prune: "true"`.
|
||||||
|
|
||||||
`<n> page(s) are in the wiki but not in wiki/ and were kept; put the word
|
|
||||||
'prune' in wiki/.publish to delete them.` The run succeeds. Pages that exist
|
|
||||||
only in the wiki are left alone unless the marker contains `prune`.
|
|
||||||
|
|
||||||
## Runner problems
|
## Runner problems
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- translation of Troubleshooting.md, source sha256 eb63f4109a0d -->
|
<!-- translation of Troubleshooting.md, source sha256 cad6363616e8 -->
|
||||||
|
|
||||||
> Ini ialah terjemahan [`Troubleshooting`](Troubleshooting). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
> Ini ialah terjemahan [`Troubleshooting`](Troubleshooting). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
||||||
|
|
||||||
@@ -30,11 +30,12 @@ Kategori menunjukkan di mana perlu dilihat. Kegagalan di luar skrip (kerja tidak
|
|||||||
| `TOKEN_FOR_GITEA is missing or empty.` | configuration | Tambah secret |
|
| `TOKEN_FOR_GITEA is missing or empty.` | configuration | Tambah secret |
|
||||||
| `Could not determine the Gitea source repository.` | configuration | Larian tiada nama repositori; laporkan sebagai kecacatan |
|
| `Could not determine the Gitea source repository.` | configuration | Larian tiada nama repositori; laporkan sebagai kecacatan |
|
||||||
| `Expected at most one GitHub push mirror ... found N` | configuration | Kekalkan satu push mirror GitHub |
|
| `Expected at most one GitHub push mirror ... found N` | configuration | Kekalkan satu push mirror GitHub |
|
||||||
| `TOKEN_FOR_GITEA_WIKI is missing or empty.` | configuration | Penerbitan wiki sahaja: repositori telah memilih menyertainya dengan `wiki/.publish` tetapi organisasinya tiada secret itu; simpannya (lihat [credentials.md](Credentials.ms)) |
|
| `TOKEN_FOR_GITEA_WIKI is missing or empty.` | configuration | Penerbitan wiki sahaja: repositori memanggil aliran kerja tetapi organisasinya tiada secret itu, atau panggilan tidak menghantarnya; simpannya dan hantar dalam `secrets:` (lihat [credentials.md](Credentials.ms)) |
|
||||||
| `wiki/.publish may only be empty or contain the word 'prune'.` | configuration | Penerbitan wiki sahaja: biarkan penanda kosong, atau letakkan hanya perkataan `prune` di dalamnya |
|
| `The prune input must be 'true' or 'false'` | configuration | Penerbitan wiki sahaja: tetapkan `prune` dalam panggilan kepada `"true"` atau `"false"` |
|
||||||
|
| `The wiki folder ... does not exist` | configuration | Penerbitan wiki sahaja: tetapkan `wiki_dir` dalam panggilan kepada folder yang mengandungi halaman (lalai `docs/wiki`) |
|
||||||
| `... HTTP 403 ...` semasa menerbitkan wiki | permissions | Penerbitan wiki sahaja: token memerlukan `write:repository` dan akses tulis kepada repositori ini |
|
| `... HTTP 403 ...` semasa menerbitkan wiki | permissions | Penerbitan wiki sahaja: token memerlukan `write:repository` dan akses tulis kepada repositori ini |
|
||||||
| `The wiki is not enabled on <repo>` | configuration | Penerbitan wiki sahaja: aktifkan wiki dalam tetapan repositori |
|
| `The wiki is not enabled on <repo>` | configuration | Penerbitan wiki sahaja: aktifkan wiki dalam tetapan repositori |
|
||||||
| `The wiki source directory ... has no Markdown pages` | configuration | Penerbitan wiki sahaja: `wiki/` kosong atau tiada; tiada apa-apa diubah |
|
| `The wiki source directory ... has no Markdown pages` | configuration | Penerbitan wiki sahaja: folder itu tiada halaman Markdown; tiada apa-apa diubah |
|
||||||
| `Could not determine the GitHub owner and repository ...` | configuration | Alamat cermin mesti kelihatan seperti `https://github.com/<owner>/<repo>.git` |
|
| `Could not determine the GitHub owner and repository ...` | configuration | Alamat cermin mesti kelihatan seperti `https://github.com/<owner>/<repo>.git` |
|
||||||
| `Gitea API request failed with HTTP 401` | credentials | Cipta token Gitea baharu dan kemas kini `TOKEN_FOR_GITEA` |
|
| `Gitea API request failed with HTTP 401` | credentials | Cipta token Gitea baharu dan kemas kini `TOKEN_FOR_GITEA` |
|
||||||
| `GitHub API request failed with HTTP 401` | credentials | Cipta token GitHub baharu dan kemas kini `PAT_FOR_GITHUB`; nilai mesti token sahaja (tiada nama, tanda petikan atau JSON) |
|
| `GitHub API request failed with HTTP 401` | credentials | Cipta token GitHub baharu dan kemas kini `PAT_FOR_GITHUB`; nilai mesti token sahaja (tiada nama, tanda petikan atau JSON) |
|
||||||
@@ -51,9 +52,7 @@ Kategori menunjukkan di mana perlu dilihat. Kegagalan di luar skrip (kerja tidak
|
|||||||
|
|
||||||
`WARNING: Gitea returned an invalid push mirror list; GitHub metadata was not synced.` Larian berjaya tetapi tiada apa-apa disegerakkan. Semak bahawa versi Gitea menyokong API push mirror dan jalankan semula.
|
`WARNING: Gitea returned an invalid push mirror list; GitHub metadata was not synced.` Larian berjaya tetapi tiada apa-apa disegerakkan. Semak bahawa versi Gitea menyokong API push mirror dan jalankan semula.
|
||||||
|
|
||||||
`No wiki/.publish marker in <owner>/<repo>; wiki publishing is not enabled for this repository.` Larian Publish wiki berjaya dan tidak menulis apa-apa. Repositori belum memilih menyertainya; tambah `wiki/.publish` jika ia sepatutnya menerbitkan.
|
`<n> page(s) are in the wiki but not in <folder>/ and were kept; set the prune input to true to delete them.` Larian berjaya. Halaman yang hanya ada dalam wiki dibiarkan melainkan panggilan menetapkan `prune: "true"`.
|
||||||
|
|
||||||
`<n> page(s) are in the wiki but not in wiki/ and were kept; put the word 'prune' in wiki/.publish to delete them.` Larian berjaya. Halaman yang hanya ada dalam wiki dibiarkan melainkan penanda mengandungi `prune`.
|
|
||||||
|
|
||||||
## Masalah runner
|
## Masalah runner
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- translation of Upgrading.md, source sha256 3f119a1ab12d -->
|
<!-- translation of Upgrading.md, source sha256 1e6a40ed1320 -->
|
||||||
|
|
||||||
> Dette er en oversættelse af [`Upgrading`](Upgrading). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
> Dette er en oversættelse af [`Upgrading`](Upgrading). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
||||||
|
|
||||||
@@ -18,9 +18,9 @@ Sådan tager en softwareudvikler en ny udgivelse af de fælles workflows i brug
|
|||||||
|
|
||||||
En udgivelse, der bryder kompatibiliteten, får en ny major-version (`v2`), så en pipeline på `@v1` aldrig modtager den, før du selv ændrer linjen.
|
En udgivelse, der bryder kompatibiliteten, får en ny major-version (`v2`), så en pipeline på `@v1` aldrig modtager den, før du selv ændrer linjen.
|
||||||
|
|
||||||
Kvalitetskontrol-workflowet henter sit script ved sit input `tools-ref`, som som standard er `v1`. For at fastlåse det helt skal du kalde det ved et præcist tag og sætte `tools-ref` til samme tag; ellers følger scriptet major-tagget.
|
Kvalitetskontrol-workflowene (`quality-checks.yml`, `quality-checks-cpp.yml` og `quality-checks-csharp.yml`) henter deres script ved deres input `tools-ref`, som som standard er `v1`. For at fastlåse et helt skal du kalde det ved et præcist tag og sætte `tools-ref` til samme tag; ellers følger scriptet major-tagget.
|
||||||
|
|
||||||
De to scoped workflows (**Sync GitHub mirror metadata** og **Publish wiki**) leveres af instansen og står ikke i dine `uses:`-linjer; du kan ikke fastlåse dem, men de henter deres scripts ved major-tagget.
|
Det scoped workflow **Sync GitHub mirror metadata** leveres af instansen og står ikke i dine `uses:`-linjer; du kan ikke fastlåse det, men det henter sit script ved major-tagget. Publicering af wiki er et genbrugeligt workflow, du kalder (`publish-wiki-pages.yml`); det scoped workflow **Publish wiki** og dets markør `wiki/.publish` blev fjernet i 2.0.0, så et repository, der stadig har markøren, publicerer ikke mere, før det kalder det genbrugelige workflow (se introduktionsguiden).
|
||||||
|
|
||||||
## Aflæsning af en changelog-post
|
## Aflæsning af en changelog-post
|
||||||
|
|
||||||
@@ -22,13 +22,18 @@ repository, tags `vMAJOR.MINOR.PATCH` and a moving major tag `vMAJOR`.
|
|||||||
A breaking release gets a new major version (`v2`), so a pipeline on `@v1`
|
A breaking release gets a new major version (`v2`), so a pipeline on `@v1`
|
||||||
never receives it until you change the line yourself.
|
never receives it until you change the line yourself.
|
||||||
|
|
||||||
The quality-checks workflow fetches its script at its input `tools-ref`, which
|
The quality-checks workflows (`quality-checks.yml`, `quality-checks-cpp.yml` and
|
||||||
defaults to `v1`. To pin it completely, call it at an exact tag and set
|
`quality-checks-csharp.yml`) fetch their script at their input `tools-ref`, which
|
||||||
|
defaults to `v1`. To pin one completely, call it at an exact tag and set
|
||||||
`tools-ref` to the same tag; otherwise the script follows the major tag.
|
`tools-ref` to the same tag; otherwise the script follows the major tag.
|
||||||
|
|
||||||
The two scoped workflows (**Sync GitHub mirror metadata** and **Publish
|
The scoped workflow **Sync GitHub mirror metadata** is delivered by the
|
||||||
wiki**) are delivered by the instance and are not in your `uses:` lines; you
|
instance and is not in your `uses:` lines; you cannot pin it, but it fetches its
|
||||||
cannot pin them, but they fetch their scripts at the major tag.
|
script at the major tag. Wiki publishing is a reusable workflow you call
|
||||||
|
(`publish-wiki-pages.yml`); the scoped **Publish wiki** workflow and its
|
||||||
|
`wiki/.publish` marker were removed in 2.0.0, so a repository that still has the
|
||||||
|
marker no longer publishes until it calls the reusable workflow (see the
|
||||||
|
onboarding guide).
|
||||||
|
|
||||||
## Reading a changelog entry
|
## Reading a changelog entry
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- translation of Upgrading.md, source sha256 3f119a1ab12d -->
|
<!-- translation of Upgrading.md, source sha256 1e6a40ed1320 -->
|
||||||
|
|
||||||
> Ini ialah terjemahan [`Upgrading`](Upgrading). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
> Ini ialah terjemahan [`Upgrading`](Upgrading). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
||||||
|
|
||||||
@@ -18,9 +18,9 @@ Cara seorang jurutera perisian menerima keluaran baharu aliran kerja bersama den
|
|||||||
|
|
||||||
Keluaran yang memecahkan keserasian mendapat versi major baharu (`v2`), jadi saluran paip pada `@v1` tidak menerimanya sehingga anda sendiri menukar baris itu.
|
Keluaran yang memecahkan keserasian mendapat versi major baharu (`v2`), jadi saluran paip pada `@v1` tidak menerimanya sehingga anda sendiri menukar baris itu.
|
||||||
|
|
||||||
Aliran kerja semakan kualiti mengambil skripnya pada inputnya `tools-ref`, yang lalai ialah `v1`. Untuk menyematkannya sepenuhnya, panggil pada tag tepat dan tetapkan `tools-ref` kepada tag yang sama; jika tidak, skrip mengikuti tag major.
|
Aliran kerja semakan kualiti (`quality-checks.yml`, `quality-checks-cpp.yml` dan `quality-checks-csharp.yml`) mengambil skripnya pada inputnya `tools-ref`, yang lalai ialah `v1`. Untuk menyematkan satu sepenuhnya, panggil pada tag tepat dan tetapkan `tools-ref` kepada tag yang sama; jika tidak, skrip mengikuti tag major.
|
||||||
|
|
||||||
Dua aliran kerja scoped (**Sync GitHub mirror metadata** dan **Publish wiki**) dihantar oleh instans dan tidak terdapat dalam baris `uses:` anda; anda tidak boleh menyematkannya, tetapi ia mengambil skripnya pada tag major.
|
Aliran kerja scoped **Sync GitHub mirror metadata** dihantar oleh instans dan tidak terdapat dalam baris `uses:` anda; anda tidak boleh menyematkannya, tetapi ia mengambil skripnya pada tag major. Penerbitan wiki ialah aliran kerja boleh guna semula yang anda panggil (`publish-wiki-pages.yml`); aliran kerja scoped **Publish wiki** dan penanda `wiki/.publish` telah dibuang dalam 2.0.0, jadi repositori yang masih mempunyai penanda itu tidak lagi menerbitkan sehingga ia memanggil aliran kerja boleh guna semula (lihat panduan permulaan).
|
||||||
|
|
||||||
## Membaca satu catatan changelog
|
## Membaca satu catatan changelog
|
||||||
|
|
||||||
@@ -9,6 +9,8 @@
|
|||||||
- [Credentials](Credentials)
|
- [Credentials](Credentials)
|
||||||
- [Troubleshooting](Troubleshooting)
|
- [Troubleshooting](Troubleshooting)
|
||||||
- [Quality checks (Python, shell)](QualityChecksPythonShell)
|
- [Quality checks (Python, shell)](QualityChecksPythonShell)
|
||||||
|
- [Quality checks (C and C++)](QualityChecksCpp)
|
||||||
|
- [Quality checks (C#)](QualityChecksCSharp)
|
||||||
- [Upgrading](Upgrading)
|
- [Upgrading](Upgrading)
|
||||||
- [Capabilities](Capabilities)
|
- [Capabilities](Capabilities)
|
||||||
|
|
||||||
@@ -19,6 +21,8 @@
|
|||||||
- [Credentials](Credentials.da)
|
- [Credentials](Credentials.da)
|
||||||
- [Fejlfinding](Troubleshooting.da)
|
- [Fejlfinding](Troubleshooting.da)
|
||||||
- [Kvalitetskontrol (Python, shell)](QualityChecksPythonShell.da)
|
- [Kvalitetskontrol (Python, shell)](QualityChecksPythonShell.da)
|
||||||
|
- [Kvalitetskontrol (C og C++)](QualityChecksCpp.da)
|
||||||
|
- [Kvalitetskontrol (C#)](QualityChecksCSharp.da)
|
||||||
- [Opgradering](Upgrading.da)
|
- [Opgradering](Upgrading.da)
|
||||||
- [Kapabiliteter](Capabilities.da)
|
- [Kapabiliteter](Capabilities.da)
|
||||||
|
|
||||||
@@ -29,5 +33,7 @@
|
|||||||
- [Kelayakan](Credentials.ms)
|
- [Kelayakan](Credentials.ms)
|
||||||
- [Diagnosis](Troubleshooting.ms)
|
- [Diagnosis](Troubleshooting.ms)
|
||||||
- [Semakan kualiti (Python, shell)](QualityChecksPythonShell.ms)
|
- [Semakan kualiti (Python, shell)](QualityChecksPythonShell.ms)
|
||||||
|
- [Semakan kualiti (C dan C++)](QualityChecksCpp.ms)
|
||||||
|
- [Semakan kualiti (C#)](QualityChecksCSharp.ms)
|
||||||
- [Menaik taraf](Upgrading.ms)
|
- [Menaik taraf](Upgrading.ms)
|
||||||
- [Keupayaan](Capabilities.ms)
|
- [Keupayaan](Capabilities.ms)
|
||||||
+1
-1
Submodule framework updated: 2b4a058f26...592c5fc9b7
+11
-10
@@ -82,29 +82,30 @@ is ever printed.
|
|||||||
|
|
||||||
## Wiki publishing secret
|
## Wiki publishing secret
|
||||||
|
|
||||||
The workflow **Publish wiki** copies `wiki/` to the Gitea wiki of a repository
|
The workflow **Publish wiki pages** copies `docs/wiki/` to the Gitea wiki of a
|
||||||
that has opted in with `wiki/.publish` (see [onboarding.md](onboarding.md)). It
|
repository that calls it (see [onboarding.md](onboarding.md)). It uses its own
|
||||||
uses its own secret, so the metadata sync token stays read-only.
|
secret, so the metadata sync token stays read-only. The caller passes the
|
||||||
|
secret in `secrets:`; it is not inherited.
|
||||||
|
|
||||||
| Secret | Content | Used for |
|
| Secret | Content | Used for |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `TOKEN_FOR_GITEA_WIKI` | The Gitea token, nothing else | Writing the wiki pages of the repositories of an organization that opt in |
|
| `TOKEN_FOR_GITEA_WIKI` | The Gitea token, nothing else | Writing the wiki pages of the repositories of an organization that opt in |
|
||||||
|
|
||||||
- Store it as a secret of the organization of each repository that publishes.
|
- Store it as a secret of the organization of each repository that publishes.
|
||||||
There is no fallback to `TOKEN_FOR_GITEA`: a repository that opted in and has
|
There is no fallback to `TOKEN_FOR_GITEA`: a repository that calls the
|
||||||
no such secret fails with a configuration error, and a repository that did
|
workflow and has no such secret fails with a configuration error, and a
|
||||||
not opt in does not need it.
|
repository that does not call it does not need it.
|
||||||
- The token needs scope `write:repository`, and its user needs write access to
|
- The token needs scope `write:repository`, and its user needs write access to
|
||||||
the repositories. Gitea has no wiki-only scope, so create the token for a
|
the repositories. Gitea has no wiki-only scope, so create the token for a
|
||||||
dedicated user. S05 approves the scope and S03 stores the secret.
|
dedicated user. S05 approves the scope and S03 stores the secret.
|
||||||
- Calls made: `GET /repos/{owner}/{repo}`, `GET /repos/{owner}/{repo}/wiki/pages`,
|
- Calls made: `GET /repos/{owner}/{repo}`, `GET /repos/{owner}/{repo}/wiki/pages`,
|
||||||
`GET`, `POST` and `PATCH /repos/{owner}/{repo}/wiki/...` and, for a page that
|
`GET`, `POST` and `PATCH /repos/{owner}/{repo}/wiki/...` and, for a page that
|
||||||
no longer exists in `wiki/`, `DELETE /repos/{owner}/{repo}/wiki/page/{name}`.
|
no longer exists in `docs/wiki/`, `DELETE /repos/{owner}/{repo}/wiki/page/{name}`.
|
||||||
- The wiki must be enabled in the repository settings. The workflow refuses to
|
- The wiki must be enabled in the repository settings. The workflow refuses to
|
||||||
run when it is not.
|
run when it is not.
|
||||||
- Pages that are in `wiki/` are always overwritten from it, so a change made
|
- Pages that are in `docs/wiki/` are always overwritten from it, so a change
|
||||||
in the Gitea web UI is lost on the next publish. Pages that are only in the
|
made in the Gitea web UI is lost on the next publish. Pages that are only in
|
||||||
wiki are removed only when `wiki/.publish` contains the word `prune`.
|
the wiki are removed only when the call sets `prune: "true"`.
|
||||||
|
|
||||||
## Rotating a token
|
## Rotating a token
|
||||||
|
|
||||||
|
|||||||
+27
-12
@@ -45,25 +45,40 @@ Delivery is automatic, so a repository needs no copy of the workflow. Secrets ar
|
|||||||
|
|
||||||
## Publish a wiki (optional)
|
## Publish a wiki (optional)
|
||||||
|
|
||||||
The **Publish wiki** workflow copies the Markdown pages in `wiki/` to the
|
The reusable workflow **Publish wiki pages** copies the Markdown pages in
|
||||||
repository wiki when a change to `wiki/` is merged to `main`. It is delivered
|
`docs/wiki/` to the repository wiki when a change to `docs/wiki/` is merged to
|
||||||
like the sync workflow, but it writes only where a repository opts in.
|
`main`. The repository calls it, so nothing is written where no call exists.
|
||||||
|
The wiki has English and the product owner's language as a minimum.
|
||||||
|
|
||||||
1. Enable the wiki in the repository settings.
|
1. Enable the wiki in the repository settings.
|
||||||
2. Add Markdown pages to `wiki/`. The file name is the page name: `Home.md` is
|
2. Add Markdown pages to `docs/wiki/`. The file name is the page name: `Home.md`
|
||||||
the home page.
|
is the home page. A hyphen in the name is a space in the page name:
|
||||||
3. Add the marker `wiki/.publish`. Leave it empty to create and update pages
|
`Home-da.md` is the page "Home da", and a link to it is `[Dansk](Home-da)`.
|
||||||
only. Put the single word `prune` in it to also delete wiki pages that are
|
3. Add a workflow, for example `.gitea/workflows/publish-wiki.yml`, that calls
|
||||||
not in `wiki/`, so the wiki always equals the folder.
|
the reusable workflow:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths: [ "docs/wiki/**" ]
|
||||||
|
jobs:
|
||||||
|
wiki:
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/publish-wiki-pages.yml@v1
|
||||||
|
with:
|
||||||
|
prune: "true"
|
||||||
|
secrets:
|
||||||
|
TOKEN_FOR_GITEA_WIKI: ${{ secrets.TOKEN_FOR_GITEA_WIKI }}
|
||||||
|
```
|
||||||
|
|
||||||
|
`wiki_dir` defaults to `docs/wiki`. `prune: "true"` also deletes wiki pages
|
||||||
|
that are not in the folder, so the wiki always equals the folder; the
|
||||||
|
default `false` keeps them.
|
||||||
4. Store `TOKEN_FOR_GITEA_WIKI` as a secret of the repository's organization,
|
4. Store `TOKEN_FOR_GITEA_WIKI` as a secret of the repository's organization,
|
||||||
using the scope in [credentials.md](credentials.md).
|
using the scope in [credentials.md](credentials.md).
|
||||||
5. Merge the change to `main`. The log must end with `Published <n> page(s) to
|
5. Merge the change to `main`. The log must end with `Published <n> page(s) to
|
||||||
the wiki of <owner>/<repo>`.
|
the wiki of <owner>/<repo>`.
|
||||||
|
|
||||||
A repository without `wiki/.publish` is skipped with the line `No
|
|
||||||
wiki/.publish marker in <owner>/<repo>`: nothing is written and no secret is
|
|
||||||
needed.
|
|
||||||
|
|
||||||
## Runners
|
## Runners
|
||||||
|
|
||||||
| Item | Value |
|
| Item | Value |
|
||||||
|
|||||||
@@ -0,0 +1,102 @@
|
|||||||
|
# Reading C and C++ quality-check results
|
||||||
|
|
||||||
|
How a software engineer calls the shared C and C++ quality checks, reads a
|
||||||
|
failed run and makes it pass. The workflow format-checks and statically checks
|
||||||
|
the C and C++ files of a repository with clang tools at exact versions, changes
|
||||||
|
no file and needs no secret. Its contract is ADR-0008 in this repository.
|
||||||
|
|
||||||
|
## Calling the workflow
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Quality C++
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
quality:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/quality-checks-cpp.yml@v1
|
||||||
|
with:
|
||||||
|
std: c++20
|
||||||
|
```
|
||||||
|
|
||||||
|
| Input | Default | Meaning |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `working-directory` | `.` | Directory, relative to the repository root, whose files are checked |
|
||||||
|
| `std` | `c++20` | C++ standard given to clang-tidy when there is no compile database, such as `c++17` or `gnu++20` |
|
||||||
|
| `compile-commands-dir` | empty | Directory, relative to the repository root, with a `compile_commands.json` that your pipeline built before the call; when set, clang-tidy uses it and ignores `std` |
|
||||||
|
| `clang-format-version` | `23.1.3` | Exact version of the clang-format package |
|
||||||
|
| `clang-tidy-version` | `22.1.8` | Exact version of the clang-tidy package |
|
||||||
|
| `tools-ref` | `v1` | Tag or branch of `TirSystem/github-action` from which the script `tools/quality-checks-cpp.sh` is fetched |
|
||||||
|
|
||||||
|
Reference the workflow at the major tag (`@v1`) or at an exact tag, never at
|
||||||
|
`main`. A call at an exact tag is pinned completely only when `tools-ref` names
|
||||||
|
the same tag. See the upgrade guide. The tool versions are exact: a newer
|
||||||
|
version of a tool is a new release of this repository, not a silent change.
|
||||||
|
|
||||||
|
## What the repository needs
|
||||||
|
|
||||||
|
- A `.clang-format` in the working directory or in a directory above it, up to
|
||||||
|
the top of the repository. Without one the run fails with `[configuration]`
|
||||||
|
and no tool runs.
|
||||||
|
- Optionally a `.clang-tidy` with the checks of the project (for example the
|
||||||
|
C++ Core Guidelines). Without one the workflow runs the compiler diagnostics
|
||||||
|
and the static analyzer (`clang-diagnostic-*` and `clang-analyzer-*`),
|
||||||
|
because clang-tidy itself enables no check when there is no configuration.
|
||||||
|
- For precise static checks, a compile database: build it first (for example
|
||||||
|
`cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON`) and pass
|
||||||
|
`compile-commands-dir: build`. The workflow does not build your project.
|
||||||
|
|
||||||
|
## What is checked
|
||||||
|
|
||||||
|
| Files | Tool | What it reports |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| tracked `*.c`, `*.cc`, `*.cpp`, `*.cxx`, `*.h`, `*.hh`, `*.hpp`, `*.hxx` | `clang-format --dry-run -Werror` | formatting that differs from `.clang-format` |
|
||||||
|
| the same files | `clang-tidy` | findings of the checks of `.clang-tidy` (or of `clang-diagnostic-*` and `clang-analyzer-*` without one); `*.c` files are checked as C17, the other files as the C++ standard of `std`; every finding is an error (`--warnings-as-errors=*`), so a warning fails the run |
|
||||||
|
|
||||||
|
Untracked files are not checked. A repository without these files passes with a
|
||||||
|
notice. There is no `cppcheck`: only an old version of it is available as a
|
||||||
|
package, and old tools are not run (ADR-0008).
|
||||||
|
|
||||||
|
## Reading a run
|
||||||
|
|
||||||
|
1. Open the status check on the pull request, then the job `quality-checks-cpp`.
|
||||||
|
2. Each tool has its own log group. Every tool runs even when an earlier one
|
||||||
|
failed, so one run shows all findings.
|
||||||
|
3. A tool ends with `PASS <tool>` or `FAIL <tool>`; the last line of a failed
|
||||||
|
run names them: `Quality checks failed: clang-format`.
|
||||||
|
4. A finding is written by the tool itself as `path:line:column: message`.
|
||||||
|
`clang-format` prints paths relative to `working-directory`; `clang-tidy`
|
||||||
|
prints absolute paths in the workspace of the runner
|
||||||
|
(`/workspace/<owner>/<repo>/main.cpp:5:18`).
|
||||||
|
|
||||||
|
## Typical failures and fixes
|
||||||
|
|
||||||
|
| Tool | What the log shows | Fix |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `clang-format` | `code should be clang-formatted [-Wclang-format-violations]` | Run `clang-format -i <file>` with the same version and commit |
|
||||||
|
| `clang-tidy` | `warning: ... [modernize-use-nullptr]` | Fix the code, or switch the check off in `.clang-tidy` with a reason |
|
||||||
|
| `clang-tidy` | `error: 'x.h' file not found` | Build the compile database and set `compile-commands-dir`, or add the include path to it |
|
||||||
|
|
||||||
|
To reproduce a run on your machine, install the same versions:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 -m venv .qc
|
||||||
|
.qc/bin/pip install clang-format==23.1.3 clang-tidy==22.1.8
|
||||||
|
git ls-files '*.cpp' '*.hpp' | xargs .qc/bin/clang-format --dry-run -Werror
|
||||||
|
```
|
||||||
|
|
||||||
|
## When the workflow itself fails
|
||||||
|
|
||||||
|
| Message | Cause | Fix |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `[configuration] std '<x>' is not a C++ standard` | `std` is not like `c++20` or `gnu++20` | Correct the input |
|
||||||
|
| `[configuration] ... is not an exact version` | A tool version is a range, a channel or empty | Give an exact version such as `23.1.3` |
|
||||||
|
| `[configuration] working-directory must be a relative path inside the repository.` | An absolute path or `..` | Use a path inside the repository |
|
||||||
|
| `[configuration] No .clang-format found` | The project has no style file | Add a `.clang-format` |
|
||||||
|
| `[configuration] compile-commands-dir '<x>' has no compile_commands.json` | The database was not built before the call | Build it in an earlier step of the job or in a job it depends on |
|
||||||
|
| The install step fails | PyPI or the runner network is unreachable | Re-run the job; see [troubleshooting.md](troubleshooting.md) |
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
# Reading C# quality-check results
|
||||||
|
|
||||||
|
How a software engineer calls the shared C# quality checks, reads a failed run
|
||||||
|
and makes it pass. The workflow checks the formatting and builds a solution or
|
||||||
|
project with warnings as errors, on an exact .NET SDK of version 10 or later,
|
||||||
|
changes no file and needs no secret. Its contract is ADR-0008 in this
|
||||||
|
repository.
|
||||||
|
|
||||||
|
## Calling the workflow
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Quality C#
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
quality:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/quality-checks-csharp.yml@v1
|
||||||
|
with:
|
||||||
|
project: src/App.sln
|
||||||
|
```
|
||||||
|
|
||||||
|
| Input | Default | Meaning |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `working-directory` | `.` | Directory, relative to the repository root, whose files are checked |
|
||||||
|
| `project` | empty | Solution or project file, relative to `working-directory`; empty uses the single `*.sln` or `*.slnx`, else the single `*.csproj`, that is tracked there |
|
||||||
|
| `dotnet-sdk-version` | `10.0.401` | Exact version of the .NET SDK, 10 or later; a channel such as `10.0`, a range and a version below 10 are refused |
|
||||||
|
| `tools-ref` | `v1` | Tag or branch of `TirSystem/github-action` from which the script `tools/quality-checks-csharp.sh` is fetched |
|
||||||
|
|
||||||
|
Reference the workflow at the major tag (`@v1`) or at an exact tag, never at
|
||||||
|
`main`. A call at an exact tag is pinned completely only when `tools-ref` names
|
||||||
|
the same tag. See the upgrade guide. The SDK version is exact: raising the
|
||||||
|
default is a new release of this repository, not a silent change.
|
||||||
|
|
||||||
|
## What the repository needs
|
||||||
|
|
||||||
|
- A solution or project that builds with the SDK. Several candidates need the
|
||||||
|
`project` input; C# files with no solution or project fail with
|
||||||
|
`[configuration]`.
|
||||||
|
- The network: `dotnet format` and `dotnet build` restore the NuGet packages of
|
||||||
|
the project in the run.
|
||||||
|
- Rules in `.editorconfig` (and the analyzers the project enables, for example
|
||||||
|
with `AnalysisLevel` and `EnforceCodeStyleInBuild`) decide what a finding is.
|
||||||
|
|
||||||
|
## What is checked
|
||||||
|
|
||||||
|
| Files | Tool | What it reports |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| the solution or project | `dotnet format --verify-no-changes` | formatting and style that differ from `.editorconfig` |
|
||||||
|
| the same | `dotnet build -warnaserror` | compiler and analyzer warnings, which fail the build |
|
||||||
|
|
||||||
|
Untracked files are not checked. A repository without `*.cs` files passes with
|
||||||
|
a notice. Project tests are not run.
|
||||||
|
|
||||||
|
## Reading a run
|
||||||
|
|
||||||
|
1. Open the status check on the pull request, then the job
|
||||||
|
`quality-checks-csharp`.
|
||||||
|
2. Each tool has its own log group. Both run even when the first failed, so one
|
||||||
|
run shows all findings.
|
||||||
|
3. A tool ends with `PASS <tool>` or `FAIL <tool>`; the last line of a failed
|
||||||
|
run names them:
|
||||||
|
`Quality checks failed: dotnet format --verify-no-changes`.
|
||||||
|
4. A finding is written by the tool itself as `path(line,column): CODE message`.
|
||||||
|
The path is absolute in the workspace of the runner
|
||||||
|
(`/workspace/<owner>/<repo>/src/Program.cs(8,27)`).
|
||||||
|
|
||||||
|
## Typical failures and fixes
|
||||||
|
|
||||||
|
| Tool | What the log shows | Fix |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `dotnet format --verify-no-changes` | `Program.cs(12,5): error WHITESPACE: Fix whitespace formatting` | Run `dotnet format <project>` and commit |
|
||||||
|
| `dotnet build -warnaserror` | `CS8602: Dereference of a possibly null reference` | Fix the code (null check), do not suppress the warning without a reason |
|
||||||
|
| `dotnet build -warnaserror` | `IDE0005: Using directive is unnecessary` | Remove the directive |
|
||||||
|
|
||||||
|
To reproduce a run on your machine, use the same SDK:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dotnet --version # 10.0.401
|
||||||
|
dotnet format src/App.sln --verify-no-changes
|
||||||
|
dotnet build src/App.sln -warnaserror
|
||||||
|
```
|
||||||
|
|
||||||
|
## When the workflow itself fails
|
||||||
|
|
||||||
|
| Message | Cause | Fix |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `[configuration] dotnet-sdk-version '<x>' is not an exact stable version 10 or later` | A channel, a range, a preview or a version below 10 | Give an exact version such as `10.0.401` |
|
||||||
|
| `[configuration] working-directory must be a relative path inside the repository.` | An absolute path or `..` | Use a path inside the repository |
|
||||||
|
| `[configuration] C# files exist but no solution or project was found` | The repository has `*.cs` files and no `*.sln`, `*.slnx` or `*.csproj` in the working directory | Add one, or set `working-directory` |
|
||||||
|
| `[configuration] Several solutions or projects were found` | More than one candidate | Set the input `project` |
|
||||||
|
| The install step fails | `dot.net` or the runner network is unreachable | Re-run the job; see [troubleshooting.md](troubleshooting.md) |
|
||||||
@@ -26,11 +26,12 @@ never starts, or stops before the step) is a **runner** problem.
|
|||||||
| `TOKEN_FOR_GITEA is missing or empty.` | configuration | Add the secret |
|
| `TOKEN_FOR_GITEA is missing or empty.` | configuration | Add the secret |
|
||||||
| `Could not determine the Gitea source repository.` | configuration | The run has no repository name; report as a defect |
|
| `Could not determine the Gitea source repository.` | configuration | The run has no repository name; report as a defect |
|
||||||
| `Expected at most one GitHub push mirror ... found N` | configuration | Keep one GitHub push mirror |
|
| `Expected at most one GitHub push mirror ... found N` | configuration | Keep one GitHub push mirror |
|
||||||
| `TOKEN_FOR_GITEA_WIKI is missing or empty.` | configuration | Wiki publishing only: the repository opted in with `wiki/.publish` but its organization has no such secret; store it (see [credentials.md](credentials.md)) |
|
| `TOKEN_FOR_GITEA_WIKI is missing or empty.` | configuration | Wiki publishing only: the repository calls the workflow but its organization has no such secret, or the call does not pass it; store it and pass it in `secrets:` (see [credentials.md](credentials.md)) |
|
||||||
| `wiki/.publish may only be empty or contain the word 'prune'.` | configuration | Wiki publishing only: leave the marker empty, or put only the word `prune` in it |
|
| `The prune input must be 'true' or 'false'` | configuration | Wiki publishing only: set `prune` in the call to `"true"` or `"false"` |
|
||||||
|
| `The wiki folder ... does not exist` | configuration | Wiki publishing only: set `wiki_dir` in the call to the folder with the pages (default `docs/wiki`) |
|
||||||
| `... HTTP 403 ...` while publishing the wiki | permissions | Wiki publishing only: the token needs `write:repository` and write access to this repository |
|
| `... HTTP 403 ...` while publishing the wiki | permissions | Wiki publishing only: the token needs `write:repository` and write access to this repository |
|
||||||
| `The wiki is not enabled on <repo>` | configuration | Wiki publishing only: enable the wiki in the repository settings |
|
| `The wiki is not enabled on <repo>` | configuration | Wiki publishing only: enable the wiki in the repository settings |
|
||||||
| `The wiki source directory ... has no Markdown pages` | configuration | Wiki publishing only: `wiki/` is empty or missing; nothing was changed |
|
| `The wiki source directory ... has no Markdown pages` | configuration | Wiki publishing only: the folder has no Markdown pages; nothing was changed |
|
||||||
| `Could not determine the GitHub owner and repository ...` | configuration | The mirror address must look like `https://github.com/<owner>/<repo>.git` |
|
| `Could not determine the GitHub owner and repository ...` | configuration | The mirror address must look like `https://github.com/<owner>/<repo>.git` |
|
||||||
| `Gitea API request failed with HTTP 401` | credentials | Create a new Gitea token and update `TOKEN_FOR_GITEA` |
|
| `Gitea API request failed with HTTP 401` | credentials | Create a new Gitea token and update `TOKEN_FOR_GITEA` |
|
||||||
| `GitHub API request failed with HTTP 401` | credentials | Create a new GitHub token and update `PAT_FOR_GITHUB`; the value must be the token only (no name, quotes or JSON) |
|
| `GitHub API request failed with HTTP 401` | credentials | Create a new GitHub token and update `PAT_FOR_GITHUB`; the value must be the token only (no name, quotes or JSON) |
|
||||||
@@ -52,13 +53,9 @@ settings.
|
|||||||
synced.` The run succeeds but nothing was synced. Check that the Gitea
|
synced.` The run succeeds but nothing was synced. Check that the Gitea
|
||||||
version supports the push mirror API and re-run.
|
version supports the push mirror API and re-run.
|
||||||
|
|
||||||
`No wiki/.publish marker in <owner>/<repo>; wiki publishing is not enabled for
|
`<n> page(s) are in the wiki but not in <folder>/ and were kept; set the prune
|
||||||
this repository.` The Publish wiki run succeeds and writes nothing. The
|
input to true to delete them.` The run succeeds. Pages that exist only in the
|
||||||
repository has not opted in; add `wiki/.publish` if it should publish.
|
wiki are left alone unless the call sets `prune: "true"`.
|
||||||
|
|
||||||
`<n> page(s) are in the wiki but not in wiki/ and were kept; put the word
|
|
||||||
'prune' in wiki/.publish to delete them.` The run succeeds. Pages that exist
|
|
||||||
only in the wiki are left alone unless the marker contains `prune`.
|
|
||||||
|
|
||||||
## Runner problems
|
## Runner problems
|
||||||
|
|
||||||
|
|||||||
+10
-5
@@ -16,13 +16,18 @@ repository, tags `vMAJOR.MINOR.PATCH` and a moving major tag `vMAJOR`.
|
|||||||
A breaking release gets a new major version (`v2`), so a pipeline on `@v1`
|
A breaking release gets a new major version (`v2`), so a pipeline on `@v1`
|
||||||
never receives it until you change the line yourself.
|
never receives it until you change the line yourself.
|
||||||
|
|
||||||
The quality-checks workflow fetches its script at its input `tools-ref`, which
|
The quality-checks workflows (`quality-checks.yml`, `quality-checks-cpp.yml` and
|
||||||
defaults to `v1`. To pin it completely, call it at an exact tag and set
|
`quality-checks-csharp.yml`) fetch their script at their input `tools-ref`, which
|
||||||
|
defaults to `v1`. To pin one completely, call it at an exact tag and set
|
||||||
`tools-ref` to the same tag; otherwise the script follows the major tag.
|
`tools-ref` to the same tag; otherwise the script follows the major tag.
|
||||||
|
|
||||||
The two scoped workflows (**Sync GitHub mirror metadata** and **Publish
|
The scoped workflow **Sync GitHub mirror metadata** is delivered by the
|
||||||
wiki**) are delivered by the instance and are not in your `uses:` lines; you
|
instance and is not in your `uses:` lines; you cannot pin it, but it fetches its
|
||||||
cannot pin them, but they fetch their scripts at the major tag.
|
script at the major tag. Wiki publishing is a reusable workflow you call
|
||||||
|
(`publish-wiki-pages.yml`); the scoped **Publish wiki** workflow and its
|
||||||
|
`wiki/.publish` marker were removed in 2.0.0, so a repository that still has the
|
||||||
|
marker no longer publishes until it calls the reusable workflow (see the
|
||||||
|
onboarding guide).
|
||||||
|
|
||||||
## Reading a changelog entry
|
## Reading a changelog entry
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,16 @@ def _write_sources(root: Path) -> None:
|
|||||||
"## 📄 License\nMIT.\n",
|
"## 📄 License\nMIT.\n",
|
||||||
encoding="utf-8",
|
encoding="utf-8",
|
||||||
)
|
)
|
||||||
for name in ("onboarding", "credentials", "troubleshooting", "quality-checks", "upgrading"):
|
guide_names = (
|
||||||
|
"onboarding",
|
||||||
|
"credentials",
|
||||||
|
"troubleshooting",
|
||||||
|
"quality-checks",
|
||||||
|
"quality-checks-cpp",
|
||||||
|
"quality-checks-csharp",
|
||||||
|
"upgrading",
|
||||||
|
)
|
||||||
|
for name in guide_names:
|
||||||
(root / "guides" / f"{name}.md").write_text(
|
(root / "guides" / f"{name}.md").write_text(
|
||||||
f"# {name.title()}\nBody.\n", encoding="utf-8"
|
f"# {name.title()}\nBody.\n", encoding="utf-8"
|
||||||
)
|
)
|
||||||
@@ -262,7 +271,7 @@ def _shape(text: str) -> dict:
|
|||||||
@pytest.mark.parametrize("code", [code for code, _label in build_wiki.LANGUAGES])
|
@pytest.mark.parametrize("code", [code for code, _label in build_wiki.LANGUAGES])
|
||||||
def test_committed_translations_follow_the_english_structure(page, code):
|
def test_committed_translations_follow_the_english_structure(page, code):
|
||||||
"""A translation has the same code blocks, table rows and heading levels."""
|
"""A translation has the same code blocks, table rows and heading levels."""
|
||||||
wiki = REPO_ROOT / "wiki"
|
wiki = REPO_ROOT / "docs" / "wiki"
|
||||||
english = _shape((wiki / f"{page}.md").read_text(encoding="utf-8"))
|
english = _shape((wiki / f"{page}.md").read_text(encoding="utf-8"))
|
||||||
translated = _shape((wiki / f"{page}.{code}.md").read_text(encoding="utf-8"))
|
translated = _shape((wiki / f"{page}.{code}.md").read_text(encoding="utf-8"))
|
||||||
assert translated == english
|
assert translated == english
|
||||||
@@ -297,7 +306,7 @@ class TestSidebar:
|
|||||||
|
|
||||||
def test_home_lists_every_workflow_file_with_a_diagram():
|
def test_home_lists_every_workflow_file_with_a_diagram():
|
||||||
"""The Home page names each workflow file of the repository and draws it."""
|
"""The Home page names each workflow file of the repository and draws it."""
|
||||||
home = (REPO_ROOT / "wiki" / "Home.md").read_text(encoding="utf-8")
|
home = (REPO_ROOT / "docs" / "wiki" / "Home.md").read_text(encoding="utf-8")
|
||||||
files = sorted(
|
files = sorted(
|
||||||
path.name
|
path.name
|
||||||
for folder in (".gitea/scoped_workflows", ".gitea/workflows")
|
for folder in (".gitea/scoped_workflows", ".gitea/workflows")
|
||||||
|
|||||||
+145
-108
@@ -1,4 +1,4 @@
|
|||||||
"""Offline tests for tools/publish_wiki.py and the scoped publish-wiki workflow."""
|
"""Offline tests for tools/publish_wiki.py and the publish-wiki workflows."""
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import io
|
import io
|
||||||
@@ -7,7 +7,9 @@ import urllib.error
|
|||||||
import pytest
|
import pytest
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from workflow_source import PUBLISH_WORKFLOW, REPO_ROOT, load_publish_module
|
from workflow_source import REPO_ROOT, load_publish_module
|
||||||
|
|
||||||
|
REUSABLE_WORKFLOW = REPO_ROOT / ".gitea" / "workflows" / "publish-wiki-pages.yml"
|
||||||
|
|
||||||
API = "https://git.example.test/api/v1"
|
API = "https://git.example.test/api/v1"
|
||||||
REPO_URL = f"{API}/repos/TirSystem/repo"
|
REPO_URL = f"{API}/repos/TirSystem/repo"
|
||||||
@@ -23,22 +25,6 @@ def b64(text: str) -> str:
|
|||||||
return base64.b64encode(text.encode()).decode()
|
return base64.b64encode(text.encode()).decode()
|
||||||
|
|
||||||
|
|
||||||
class TestParseMarker:
|
|
||||||
@pytest.mark.parametrize(
|
|
||||||
("text", "expected"),
|
|
||||||
[("", False), (" \n", False), (None, False), ("prune", True), (" prune\n", True)],
|
|
||||||
)
|
|
||||||
def test_reads_the_empty_marker_and_the_prune_word(self, publish_wiki, text, expected):
|
|
||||||
assert publish_wiki.parse_marker(text) is expected
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("text", ["Prune", "prune: true", "delete", "prune\nmore"])
|
|
||||||
def test_rejects_anything_else(self, publish_wiki, text):
|
|
||||||
with pytest.raises(publish_wiki.WorkflowError) as caught:
|
|
||||||
publish_wiki.parse_marker(text)
|
|
||||||
assert caught.value.category == "configuration"
|
|
||||||
assert "prune" in str(caught.value)
|
|
||||||
|
|
||||||
|
|
||||||
class TestParseGiteaToken:
|
class TestParseGiteaToken:
|
||||||
def test_returns_the_stripped_token(self, publish_wiki):
|
def test_returns_the_stripped_token(self, publish_wiki):
|
||||||
assert publish_wiki.parse_gitea_token(" abc \n") == "abc"
|
assert publish_wiki.parse_gitea_token(" abc \n") == "abc"
|
||||||
@@ -52,21 +38,28 @@ class TestParseGiteaToken:
|
|||||||
|
|
||||||
|
|
||||||
class TestReadPages:
|
class TestReadPages:
|
||||||
def test_reads_markdown_files_by_stem_and_ignores_the_marker(self, publish_wiki, tmp_path):
|
def test_reads_markdown_files_by_stem_and_ignores_other_files(self, publish_wiki, tmp_path):
|
||||||
(tmp_path / "Home.md").write_bytes(b"home")
|
(tmp_path / "Home.md").write_bytes(b"home")
|
||||||
(tmp_path / "Home.da.md").write_bytes(b"hjem")
|
(tmp_path / "Home.da.md").write_bytes(b"hjem")
|
||||||
(tmp_path / ".publish").write_bytes(b"prune")
|
|
||||||
(tmp_path / "Notes.txt").write_bytes(b"ignored")
|
(tmp_path / "Notes.txt").write_bytes(b"ignored")
|
||||||
assert publish_wiki.read_pages(tmp_path) == {"Home": b"home", "Home.da": b"hjem"}
|
assert publish_wiki.read_pages(tmp_path) == {"Home": b"home", "Home.da": b"hjem"}
|
||||||
|
|
||||||
def test_rejects_a_directory_without_pages_so_the_wiki_is_never_wiped(
|
def test_rejects_a_directory_without_pages_so_the_wiki_is_never_wiped(
|
||||||
self, publish_wiki, tmp_path
|
self, publish_wiki, tmp_path
|
||||||
):
|
):
|
||||||
(tmp_path / ".publish").write_text("prune", encoding="utf-8")
|
|
||||||
with pytest.raises(publish_wiki.WorkflowError, match="no Markdown pages"):
|
with pytest.raises(publish_wiki.WorkflowError, match="no Markdown pages"):
|
||||||
publish_wiki.read_pages(tmp_path)
|
publish_wiki.read_pages(tmp_path)
|
||||||
|
|
||||||
|
|
||||||
|
class TestPageTitle:
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
("key", "title"), [("Home", "Home"), ("Home-da", "Home da"), ("Getting-Started-ms", "Getting Started ms")]
|
||||||
|
)
|
||||||
|
def test_a_hyphen_is_sent_as_a_space(self, publish_wiki, key, title):
|
||||||
|
# Gitea keeps a hyphen in a title literal (Home-da.-.md, address Home%2Dda).
|
||||||
|
assert publish_wiki.page_title(key) == title
|
||||||
|
|
||||||
|
|
||||||
class TestPageKey:
|
class TestPageKey:
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("name", "key"),
|
("name", "key"),
|
||||||
@@ -107,12 +100,13 @@ class FakeGitea:
|
|||||||
raise self.error("configuration", "404")
|
raise self.error("configuration", "404")
|
||||||
return [{"title": key.replace("-", " "), "sub_url": key} for key in self.wiki]
|
return [{"title": key.replace("-", " "), "sub_url": key} for key in self.wiki]
|
||||||
if method == "POST" and url == f"{WIKI_URL}/new":
|
if method == "POST" and url == f"{WIKI_URL}/new":
|
||||||
self.wiki[body["title"]] = body["content_base64"]
|
self.wiki[body["title"].replace(" ", "-")] = body["content_base64"]
|
||||||
return None
|
return None
|
||||||
title = url.rsplit("/", 1)[-1]
|
title = url.rsplit("/", 1)[-1]
|
||||||
if method == "GET":
|
if method == "GET":
|
||||||
return {"title": title, "content_base64": self.wiki[title]}
|
return {"title": title, "content_base64": self.wiki[title]}
|
||||||
if method == "PATCH":
|
if method == "PATCH":
|
||||||
|
assert " " in body["title"] or "-" not in body["title"], body["title"]
|
||||||
self.wiki[title] = body["content_base64"]
|
self.wiki[title] = body["content_base64"]
|
||||||
return None
|
return None
|
||||||
if method == "DELETE":
|
if method == "DELETE":
|
||||||
@@ -131,7 +125,7 @@ def environment(monkeypatch, tmp_path):
|
|||||||
wiki_dir.mkdir()
|
wiki_dir.mkdir()
|
||||||
(wiki_dir / "Home.md").write_text("home v2", encoding="utf-8")
|
(wiki_dir / "Home.md").write_text("home v2", encoding="utf-8")
|
||||||
(wiki_dir / "Credentials.md").write_text("credentials", encoding="utf-8")
|
(wiki_dir / "Credentials.md").write_text("credentials", encoding="utf-8")
|
||||||
(wiki_dir / ".publish").write_text("prune\n", encoding="utf-8")
|
monkeypatch.setenv("WIKI_PRUNE", "true")
|
||||||
monkeypatch.setenv("WIKI_DIR", str(wiki_dir))
|
monkeypatch.setenv("WIKI_DIR", str(wiki_dir))
|
||||||
monkeypatch.setenv("GITEA_API_URL", f"{API}/")
|
monkeypatch.setenv("GITEA_API_URL", f"{API}/")
|
||||||
monkeypatch.setenv("SOURCE_REPOSITORY", "TirSystem/repo")
|
monkeypatch.setenv("SOURCE_REPOSITORY", "TirSystem/repo")
|
||||||
@@ -144,58 +138,6 @@ def run_main(publish_wiki, gitea):
|
|||||||
return publish_wiki.main()
|
return publish_wiki.main()
|
||||||
|
|
||||||
|
|
||||||
class TestOptIn:
|
|
||||||
def test_a_repository_without_the_marker_is_never_written_to(
|
|
||||||
self, publish_wiki, environment, capsys
|
|
||||||
):
|
|
||||||
(environment / ".publish").unlink()
|
|
||||||
gitea = FakeGitea(publish_wiki, wiki={"Old": b64("hand written")})
|
|
||||||
|
|
||||||
assert run_main(publish_wiki, gitea) == 0
|
|
||||||
|
|
||||||
assert gitea.calls == []
|
|
||||||
assert "wiki publishing is not enabled" in capsys.readouterr().out
|
|
||||||
assert gitea.wiki == {"Old": b64("hand written")}
|
|
||||||
|
|
||||||
def test_a_repository_without_the_marker_does_not_need_the_secret(
|
|
||||||
self, publish_wiki, environment, monkeypatch
|
|
||||||
):
|
|
||||||
(environment / ".publish").unlink()
|
|
||||||
monkeypatch.setenv("WIKI_CREDENTIALS", "")
|
|
||||||
assert run_main(publish_wiki, FakeGitea(publish_wiki)) == 0
|
|
||||||
|
|
||||||
def test_a_repository_without_a_wiki_directory_is_skipped(
|
|
||||||
self, publish_wiki, monkeypatch, tmp_path
|
|
||||||
):
|
|
||||||
monkeypatch.setenv("WIKI_DIR", str(tmp_path / "missing"))
|
|
||||||
monkeypatch.setenv("SOURCE_REPOSITORY", "TirSystem/repo")
|
|
||||||
gitea = FakeGitea(publish_wiki)
|
|
||||||
assert run_main(publish_wiki, gitea) == 0
|
|
||||||
assert gitea.calls == []
|
|
||||||
|
|
||||||
def test_an_opted_in_repository_without_the_secret_fails_before_any_request(
|
|
||||||
self, publish_wiki, environment, monkeypatch
|
|
||||||
):
|
|
||||||
monkeypatch.setenv("WIKI_CREDENTIALS", "")
|
|
||||||
gitea = FakeGitea(publish_wiki)
|
|
||||||
|
|
||||||
with pytest.raises(publish_wiki.WorkflowError, match="TOKEN_FOR_GITEA_WIKI"):
|
|
||||||
run_main(publish_wiki, gitea)
|
|
||||||
|
|
||||||
assert gitea.calls == []
|
|
||||||
|
|
||||||
def test_an_unknown_marker_content_is_refused_before_any_request(
|
|
||||||
self, publish_wiki, environment
|
|
||||||
):
|
|
||||||
(environment / ".publish").write_text("mirror everything", encoding="utf-8")
|
|
||||||
gitea = FakeGitea(publish_wiki)
|
|
||||||
|
|
||||||
with pytest.raises(publish_wiki.WorkflowError, match="prune"):
|
|
||||||
run_main(publish_wiki, gitea)
|
|
||||||
|
|
||||||
assert gitea.calls == []
|
|
||||||
|
|
||||||
|
|
||||||
class TestPublish:
|
class TestPublish:
|
||||||
def test_prune_creates_updates_and_deletes_to_match_the_source(
|
def test_prune_creates_updates_and_deletes_to_match_the_source(
|
||||||
self, publish_wiki, environment, capsys
|
self, publish_wiki, environment, capsys
|
||||||
@@ -215,9 +157,9 @@ class TestPublish:
|
|||||||
assert "0 created, 1 updated, 1 deleted" in capsys.readouterr().out
|
assert "0 created, 1 updated, 1 deleted" in capsys.readouterr().out
|
||||||
|
|
||||||
def test_without_prune_pages_outside_the_source_are_kept(
|
def test_without_prune_pages_outside_the_source_are_kept(
|
||||||
self, publish_wiki, environment, capsys
|
self, publish_wiki, environment, capsys, monkeypatch
|
||||||
):
|
):
|
||||||
(environment / ".publish").write_text("", encoding="utf-8")
|
monkeypatch.setenv("WIKI_PRUNE", "false")
|
||||||
gitea = FakeGitea(
|
gitea = FakeGitea(
|
||||||
publish_wiki, wiki={"Home": b64("home v1"), "Old": b64("hand written")}
|
publish_wiki, wiki={"Home": b64("home v1"), "Old": b64("hand written")}
|
||||||
)
|
)
|
||||||
@@ -290,11 +232,11 @@ class TestPageIdentity:
|
|||||||
"""A wiki that already has pages named with spaces, as Gitea stores them."""
|
"""A wiki that already has pages named with spaces, as Gitea stores them."""
|
||||||
|
|
||||||
def test_a_file_named_with_a_space_updates_the_existing_page(
|
def test_a_file_named_with_a_space_updates_the_existing_page(
|
||||||
self, publish_wiki, environment
|
self, publish_wiki, environment, monkeypatch
|
||||||
):
|
):
|
||||||
(environment / "Home.md").unlink()
|
(environment / "Home.md").unlink()
|
||||||
(environment / "Credentials.md").unlink()
|
(environment / "Credentials.md").unlink()
|
||||||
(environment / ".publish").write_text("", encoding="utf-8")
|
monkeypatch.setenv("WIKI_PRUNE", "false")
|
||||||
(environment / "Home da.md").write_text("hjem v2", encoding="utf-8")
|
(environment / "Home da.md").write_text("hjem v2", encoding="utf-8")
|
||||||
gitea = FakeGitea(publish_wiki, wiki={"Home-da": b64("hjem v1")})
|
gitea = FakeGitea(publish_wiki, wiki={"Home-da": b64("hjem v1")})
|
||||||
|
|
||||||
@@ -440,42 +382,137 @@ class TestRequestJson:
|
|||||||
assert caught.value.category == "api"
|
assert caught.value.category == "api"
|
||||||
|
|
||||||
|
|
||||||
class TestWorkflow:
|
class TestExplicitPrune:
|
||||||
|
"""The reusable workflow sets WIKI_PRUNE: the caller is the opt-in (MIL-008)."""
|
||||||
|
|
||||||
|
@pytest.fixture()
|
||||||
|
def explicit(self, environment, monkeypatch):
|
||||||
|
monkeypatch.setenv("WIKI_PRUNE", "false")
|
||||||
|
return environment
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
("text", "expected"), [("true", True), (" TRUE\n", True), ("false", False)]
|
||||||
|
)
|
||||||
|
def test_reads_true_and_false(self, publish_wiki, text, expected):
|
||||||
|
assert publish_wiki.parse_prune_setting(text) is expected
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("text", ["", "yes", "prune", None])
|
||||||
|
def test_rejects_anything_else(self, publish_wiki, text):
|
||||||
|
with pytest.raises(publish_wiki.WorkflowError) as caught:
|
||||||
|
publish_wiki.parse_prune_setting(text)
|
||||||
|
assert caught.value.category == "configuration"
|
||||||
|
|
||||||
|
def test_publishes_without_a_marker_and_keeps_other_pages(
|
||||||
|
self, publish_wiki, explicit, capsys
|
||||||
|
):
|
||||||
|
gitea = FakeGitea(publish_wiki, wiki={"Old": b64("hand written")})
|
||||||
|
|
||||||
|
assert run_main(publish_wiki, gitea) == 0
|
||||||
|
|
||||||
|
assert set(gitea.wiki) == {"Old", "Home", "Credentials"}
|
||||||
|
assert "set the prune input to true" in capsys.readouterr().out
|
||||||
|
|
||||||
|
def test_prune_true_deletes_pages_outside_the_folder(
|
||||||
|
self, publish_wiki, explicit, monkeypatch
|
||||||
|
):
|
||||||
|
monkeypatch.setenv("WIKI_PRUNE", "true")
|
||||||
|
gitea = FakeGitea(publish_wiki, wiki={"Old": b64("stale")})
|
||||||
|
|
||||||
|
assert run_main(publish_wiki, gitea) == 0
|
||||||
|
|
||||||
|
assert set(gitea.wiki) == {"Home", "Credentials"}
|
||||||
|
|
||||||
|
def test_a_missing_folder_is_a_configuration_error_before_any_request(
|
||||||
|
self, publish_wiki, explicit, monkeypatch, tmp_path
|
||||||
|
):
|
||||||
|
monkeypatch.setenv("WIKI_DIR", str(tmp_path / "docs" / "wiki"))
|
||||||
|
gitea = FakeGitea(publish_wiki)
|
||||||
|
|
||||||
|
with pytest.raises(publish_wiki.WorkflowError, match="wiki_dir") as caught:
|
||||||
|
run_main(publish_wiki, gitea)
|
||||||
|
|
||||||
|
assert caught.value.category == "configuration"
|
||||||
|
assert gitea.calls == []
|
||||||
|
|
||||||
|
def test_an_empty_folder_never_deletes_pages_even_with_prune(
|
||||||
|
self, publish_wiki, explicit, monkeypatch
|
||||||
|
):
|
||||||
|
monkeypatch.setenv("WIKI_PRUNE", "true")
|
||||||
|
for page in explicit.glob("*.md"):
|
||||||
|
page.unlink()
|
||||||
|
gitea = FakeGitea(publish_wiki, wiki={"Home": b64("home")})
|
||||||
|
|
||||||
|
with pytest.raises(publish_wiki.WorkflowError) as caught:
|
||||||
|
run_main(publish_wiki, gitea)
|
||||||
|
|
||||||
|
assert caught.value.category == "configuration"
|
||||||
|
assert gitea.writes == []
|
||||||
|
|
||||||
|
def test_a_missing_secret_fails_before_any_request(
|
||||||
|
self, publish_wiki, explicit, monkeypatch
|
||||||
|
):
|
||||||
|
monkeypatch.setenv("WIKI_CREDENTIALS", "")
|
||||||
|
gitea = FakeGitea(publish_wiki)
|
||||||
|
|
||||||
|
with pytest.raises(publish_wiki.WorkflowError, match="TOKEN_FOR_GITEA_WIKI"):
|
||||||
|
run_main(publish_wiki, gitea)
|
||||||
|
|
||||||
|
assert gitea.calls == []
|
||||||
|
|
||||||
|
|
||||||
|
class TestReusableWorkflow:
|
||||||
@pytest.fixture()
|
@pytest.fixture()
|
||||||
def document(self):
|
def document(self):
|
||||||
return yaml.safe_load(PUBLISH_WORKFLOW.read_text(encoding="utf-8"))
|
return yaml.safe_load(REUSABLE_WORKFLOW.read_text(encoding="utf-8"))
|
||||||
|
|
||||||
def test_runs_only_on_main_when_wiki_changes_or_by_hand(self, document):
|
def test_is_called_and_has_no_other_trigger(self, document):
|
||||||
triggers = document[True] # PyYAML reads the key `on` as True
|
assert list(document[True]) == ["workflow_call"]
|
||||||
assert triggers["push"]["branches"] == ["main"]
|
|
||||||
assert triggers["push"]["paths"] == ["wiki/**"]
|
def test_the_folder_defaults_to_docs_wiki_and_nothing_is_pruned_by_default(self, document):
|
||||||
assert "workflow_dispatch" in triggers
|
inputs = document[True]["workflow_call"]["inputs"]
|
||||||
|
assert inputs["wiki_dir"]["default"] == "docs/wiki"
|
||||||
|
assert inputs["prune"]["default"] == "false"
|
||||||
|
|
||||||
|
def test_the_token_is_a_declared_secret_without_a_fallback(self, document):
|
||||||
|
text = REUSABLE_WORKFLOW.read_text(encoding="utf-8")
|
||||||
|
assert document[True]["workflow_call"]["secrets"]["TOKEN_FOR_GITEA_WIKI"]["required"]
|
||||||
|
assert "secrets.TOKEN_FOR_GITEA }}" not in text
|
||||||
|
assert "github.token" not in text
|
||||||
|
|
||||||
def test_job_has_read_only_permissions(self, document):
|
def test_job_has_read_only_permissions(self, document):
|
||||||
assert document["jobs"]["publish-wiki"]["permissions"] == {"contents": "read"}
|
assert document["jobs"]["publish-wiki"]["permissions"] == {"contents": "read"}
|
||||||
|
|
||||||
def test_secret_is_passed_only_through_the_environment_and_has_no_fallback(self, document):
|
def test_the_inputs_reach_the_script_through_the_environment(self, document):
|
||||||
text = PUBLISH_WORKFLOW.read_text(encoding="utf-8")
|
step = document["jobs"]["publish-wiki"]["steps"][-1]
|
||||||
assert "secrets.TOKEN_FOR_GITEA }}" not in text
|
assert step["env"]["WIKI_DIR"] == "${{ inputs.wiki_dir }}"
|
||||||
publish_step = document["jobs"]["publish-wiki"]["steps"][-1]
|
assert step["env"]["WIKI_PRUNE"] == "${{ inputs.prune }}"
|
||||||
assert publish_step["env"]["WIKI_CREDENTIALS"] == "${{ secrets.TOKEN_FOR_GITEA_WIKI }}"
|
assert step["env"]["WIKI_CREDENTIALS"] == "${{ secrets.TOKEN_FOR_GITEA_WIKI }}"
|
||||||
assert "secrets" not in publish_step["run"]
|
assert step["run"] == "python3 shared-scripts/tools/publish_wiki.py"
|
||||||
|
assert "inputs." not in step["run"]
|
||||||
|
|
||||||
def test_the_workflow_has_one_source_and_runs_the_script_file(self, document):
|
def test_the_script_is_fetched_at_the_tools_ref(self, document):
|
||||||
assert not (REPO_ROOT / ".gitea" / "workflows" / "publish-wiki.yml").exists()
|
fetch = document["jobs"]["publish-wiki"]["steps"][1]["with"]
|
||||||
assert (REPO_ROOT / "tools" / "publish_wiki.py").is_file()
|
assert fetch["repository"] == "TirSystem/github-action"
|
||||||
steps = document["jobs"]["publish-wiki"]["steps"]
|
assert fetch["ref"] == "${{ inputs.tools-ref }}"
|
||||||
assert "python3 - <<" not in PUBLISH_WORKFLOW.read_text(encoding="utf-8")
|
|
||||||
assert steps[0]["uses"].startswith("actions/checkout@")
|
|
||||||
assert steps[1]["with"] == {
|
|
||||||
"repository": "TirSystem/github-action",
|
|
||||||
"ref": "v1",
|
|
||||||
"path": "shared-scripts",
|
|
||||||
}
|
|
||||||
assert steps[-1]["run"] == "python3 shared-scripts/tools/publish_wiki.py"
|
|
||||||
|
|
||||||
|
|
||||||
def test_this_repository_opts_in_and_prunes():
|
def test_the_scoped_workflow_is_gone_and_the_script_has_no_marker_path():
|
||||||
"""The wiki of this repository must equal wiki/ (ADR-0001, ADR-0004)."""
|
"""ADR-0009, MIL-009: the scoped publish-wiki.yml and the marker are removed."""
|
||||||
marker = REPO_ROOT / "wiki" / ".publish"
|
assert not (REPO_ROOT / ".gitea" / "scoped_workflows" / "publish-wiki.yml").exists()
|
||||||
assert marker.read_text(encoding="utf-8").strip() == "prune"
|
source = (REPO_ROOT / "tools" / "publish_wiki.py").read_text(encoding="utf-8")
|
||||||
|
assert "MARKER_NAME" not in source
|
||||||
|
assert "parse_marker" not in source
|
||||||
|
|
||||||
|
|
||||||
|
def test_this_repository_publishes_docs_wiki_through_the_reusable_workflow():
|
||||||
|
"""The wiki of this repository equals docs/wiki/ (ADR-0009, MIL-008 task 4)."""
|
||||||
|
assert not (REPO_ROOT / "wiki").exists()
|
||||||
|
assert (REPO_ROOT / "docs" / "wiki" / "Home.md").is_file()
|
||||||
|
caller = yaml.safe_load(
|
||||||
|
(REPO_ROOT / ".gitea" / "workflows" / "publish-own-wiki.yml").read_text(encoding="utf-8")
|
||||||
|
)
|
||||||
|
job = caller["jobs"]["wiki"]
|
||||||
|
assert job["uses"] == "./.gitea/workflows/publish-wiki-pages.yml"
|
||||||
|
assert job["with"]["wiki_dir"] == "docs/wiki"
|
||||||
|
assert job["with"]["prune"] == "true"
|
||||||
|
assert caller[True]["push"]["paths"] == ["docs/wiki/**"]
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ network, no clang and no .NET SDK are needed.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@@ -285,7 +286,94 @@ class TestCppRun:
|
|||||||
result, calls = self.run(repo, tmp_path, cpp_bin, COMPILE_COMMANDS_DIR="build")
|
result, calls = self.run(repo, tmp_path, cpp_bin, COMPILE_COMMANDS_DIR="build")
|
||||||
assert result.returncode == 0, result.stdout
|
assert result.returncode == 0, result.stdout
|
||||||
assert len(calls) == 2
|
assert len(calls) == 2
|
||||||
assert "-p build" in calls[1] and "-std=" not in calls[1]
|
database = re.search(r"-p (\S+)", calls[1])
|
||||||
|
assert database is not None and database.group(1).endswith(f"/{repo.name}/build")
|
||||||
|
assert "-std=" not in calls[1]
|
||||||
|
|
||||||
|
def test_clang_tidy_gets_default_checks_without_a_clang_tidy_file(
|
||||||
|
self,
|
||||||
|
repo: Path,
|
||||||
|
tmp_path: Path,
|
||||||
|
cpp_bin: Path,
|
||||||
|
) -> None:
|
||||||
|
add_files(repo, "a.cpp")
|
||||||
|
_, calls = self.run(repo, tmp_path, cpp_bin)
|
||||||
|
assert "--checks=clang-diagnostic-*,clang-analyzer-*" in calls[1]
|
||||||
|
assert "--checks=" not in calls[0]
|
||||||
|
|
||||||
|
def test_no_default_checks_when_a_clang_tidy_file_is_in_the_repository_root(
|
||||||
|
self,
|
||||||
|
repo: Path,
|
||||||
|
tmp_path: Path,
|
||||||
|
cpp_bin: Path,
|
||||||
|
) -> None:
|
||||||
|
add_files(repo, "a.cpp", ".clang-tidy")
|
||||||
|
_, calls = self.run(repo, tmp_path, cpp_bin)
|
||||||
|
assert len(calls) == 2
|
||||||
|
assert not any("--checks=" in call for call in calls)
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
("files", "extra", "tidy_calls"),
|
||||||
|
[
|
||||||
|
(("a.cpp", "lib/c.c"), {}, 2),
|
||||||
|
(("a.cpp", ".clang-tidy"), {}, 1),
|
||||||
|
(("a.cpp", "build/compile_commands.json"), {"COMPILE_COMMANDS_DIR": "build"}, 1),
|
||||||
|
],
|
||||||
|
ids=["no-clang-tidy-file", "clang-tidy-file", "compile-database"],
|
||||||
|
)
|
||||||
|
def test_every_clang_tidy_call_treats_warnings_as_errors(
|
||||||
|
self,
|
||||||
|
repo: Path,
|
||||||
|
tmp_path: Path,
|
||||||
|
cpp_bin: Path,
|
||||||
|
files: tuple[str, ...],
|
||||||
|
extra: dict[str, str],
|
||||||
|
tidy_calls: int,
|
||||||
|
) -> None:
|
||||||
|
add_files(repo, *files)
|
||||||
|
_, calls = self.run(repo, tmp_path, cpp_bin, **extra)
|
||||||
|
tidy = [c for c in calls if c.startswith("clang-tidy")]
|
||||||
|
assert len(tidy) == tidy_calls
|
||||||
|
assert all("--warnings-as-errors=*" in call for call in tidy)
|
||||||
|
assert "--warnings-as-errors" not in calls[0] and calls[0].startswith("clang-format")
|
||||||
|
|
||||||
|
def test_no_default_checks_when_a_clang_tidy_file_is_above_the_working_directory(
|
||||||
|
self,
|
||||||
|
repo: Path,
|
||||||
|
tmp_path: Path,
|
||||||
|
cpp_bin: Path,
|
||||||
|
) -> None:
|
||||||
|
add_files(repo, "service/a.cpp", ".clang-tidy")
|
||||||
|
_, calls = self.run(repo, tmp_path, cpp_bin, WORKING_DIRECTORY="service")
|
||||||
|
assert len(calls) == 2
|
||||||
|
assert not any("--checks=" in call for call in calls)
|
||||||
|
|
||||||
|
def test_a_compile_database_is_resolved_from_the_repository_root(
|
||||||
|
self,
|
||||||
|
repo: Path,
|
||||||
|
tmp_path: Path,
|
||||||
|
cpp_bin: Path,
|
||||||
|
) -> None:
|
||||||
|
add_files(repo, "service/a.cpp", "build/compile_commands.json")
|
||||||
|
result, calls = self.run(
|
||||||
|
repo, tmp_path, cpp_bin, WORKING_DIRECTORY="service", COMPILE_COMMANDS_DIR="build"
|
||||||
|
)
|
||||||
|
assert result.returncode == 0, result.stdout
|
||||||
|
database = re.search(r"-p (\S+)", calls[1])
|
||||||
|
assert database is not None and database.group(1).endswith(f"/{repo.name}/build")
|
||||||
|
|
||||||
|
def test_a_compile_database_only_inside_the_working_directory_is_not_found(
|
||||||
|
self,
|
||||||
|
repo: Path,
|
||||||
|
tmp_path: Path,
|
||||||
|
cpp_bin: Path,
|
||||||
|
) -> None:
|
||||||
|
add_files(repo, "service/a.cpp", "service/build/compile_commands.json")
|
||||||
|
result, calls = self.run(
|
||||||
|
repo, tmp_path, cpp_bin, WORKING_DIRECTORY="service", COMPILE_COMMANDS_DIR="build"
|
||||||
|
)
|
||||||
|
assert result.returncode == 1 and "[configuration]" in result.stdout
|
||||||
|
assert calls == []
|
||||||
|
|
||||||
def test_a_missing_compile_database_is_a_configuration_error(
|
def test_a_missing_compile_database_is_a_configuration_error(
|
||||||
self,
|
self,
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ class TestBuildWikiCommandLine:
|
|||||||
monkeypatch.setattr(build_wiki._module, "check_translations", lambda: [])
|
monkeypatch.setattr(build_wiki._module, "check_translations", lambda: [])
|
||||||
assert build_wiki["main"](["--check"]) == 1
|
assert build_wiki["main"](["--check"]) == 1
|
||||||
err = capsys.readouterr().err
|
err = capsys.readouterr().err
|
||||||
assert "ERROR: wiki/Home.md: missing" in err
|
assert "ERROR: docs/wiki/Home.md: missing" in err
|
||||||
assert "python tools/build_wiki.py" in err
|
assert "python tools/build_wiki.py" in err
|
||||||
|
|
||||||
def test_generate_reports_the_changed_pages(self, monkeypatch, capsys):
|
def test_generate_reports_the_changed_pages(self, monkeypatch, capsys):
|
||||||
@@ -320,7 +320,7 @@ class TestRunAsAProcess:
|
|||||||
assert result.stderr.startswith("ERROR: [configuration]")
|
assert result.stderr.startswith("ERROR: [configuration]")
|
||||||
|
|
||||||
def test_publish_wiki_without_a_repository_exits_1(self):
|
def test_publish_wiki_without_a_repository_exits_1(self):
|
||||||
result = run_tool("publish_wiki.py", WIKI_DIR=str(REPO_ROOT / "wiki"), GITEA_API_URL="https://x")
|
result = run_tool("publish_wiki.py", WIKI_DIR=str(REPO_ROOT / "docs" / "wiki"), GITEA_API_URL="https://x")
|
||||||
assert result.returncode == 1
|
assert result.returncode == 1
|
||||||
assert "ERROR:" in result.stderr
|
assert "ERROR:" in result.stderr
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ class TestEachWorkflow:
|
|||||||
def test_every_job_declares_permissions_and_runner(self, path):
|
def test_every_job_declares_permissions_and_runner(self, path):
|
||||||
document = yaml.safe_load(path.read_text(encoding="utf-8"))
|
document = yaml.safe_load(path.read_text(encoding="utf-8"))
|
||||||
for name, job in document["jobs"].items():
|
for name, job in document["jobs"].items():
|
||||||
|
if "uses" not in job: # a called workflow has its own runner
|
||||||
assert "runs-on" in job, f"job {name} has no runs-on"
|
assert "runs-on" in job, f"job {name} has no runs-on"
|
||||||
assert "permissions" in job, f"job {name} has no explicit permissions"
|
assert "permissions" in job, f"job {name} has no explicit permissions"
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ WORKFLOW_DIRS = (
|
|||||||
)
|
)
|
||||||
SYNC_WORKFLOW = WORKFLOW_DIRS[0] / "sync-github-metadata.yml"
|
SYNC_WORKFLOW = WORKFLOW_DIRS[0] / "sync-github-metadata.yml"
|
||||||
SYNC_SCRIPT = REPO_ROOT / "tools" / "sync_github_metadata.py"
|
SYNC_SCRIPT = REPO_ROOT / "tools" / "sync_github_metadata.py"
|
||||||
PUBLISH_WORKFLOW = WORKFLOW_DIRS[0] / "publish-wiki.yml"
|
|
||||||
PUBLISH_SCRIPT = REPO_ROOT / "tools" / "publish_wiki.py"
|
PUBLISH_SCRIPT = REPO_ROOT / "tools" / "publish_wiki.py"
|
||||||
|
|
||||||
_HEREDOC = re.compile(
|
_HEREDOC = re.compile(
|
||||||
|
|||||||
+12
-8
@@ -1,4 +1,4 @@
|
|||||||
"""Build the English wiki pages in ``wiki/`` from ``README.md`` and ``guides/``.
|
"""Build the English wiki pages in ``docs/wiki/`` from ``README.md`` and ``guides/``.
|
||||||
|
|
||||||
The wiki source lives in this repository (MIL-005). The English pages are
|
The wiki source lives in this repository (MIL-005). The English pages are
|
||||||
generated, never edited by hand; ``--check`` reports a page that differs from
|
generated, never edited by hand; ``--check`` reports a page that differs from
|
||||||
@@ -18,7 +18,7 @@ from dataclasses import dataclass
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
REPO_ROOT = Path(__file__).resolve().parent.parent
|
REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||||
WIKI_DIR = REPO_ROOT / "wiki"
|
WIKI_DIR = REPO_ROOT / "docs" / "wiki"
|
||||||
SOURCE_BASE_URL = "https://git.tirsystem.com/TirSystem/github-action/src/branch/main"
|
SOURCE_BASE_URL = "https://git.tirsystem.com/TirSystem/github-action/src/branch/main"
|
||||||
GENERATOR = "tools/build_wiki.py"
|
GENERATOR = "tools/build_wiki.py"
|
||||||
|
|
||||||
@@ -44,11 +44,13 @@ PAGES: tuple[Page, ...] = (
|
|||||||
Page("Credentials", "guides/credentials.md"),
|
Page("Credentials", "guides/credentials.md"),
|
||||||
Page("Troubleshooting", "guides/troubleshooting.md"),
|
Page("Troubleshooting", "guides/troubleshooting.md"),
|
||||||
Page("QualityChecksPythonShell", "guides/quality-checks.md"),
|
Page("QualityChecksPythonShell", "guides/quality-checks.md"),
|
||||||
|
Page("QualityChecksCpp", "guides/quality-checks-cpp.md"),
|
||||||
|
Page("QualityChecksCSharp", "guides/quality-checks-csharp.md"),
|
||||||
Page("Upgrading", "guides/upgrading.md"),
|
Page("Upgrading", "guides/upgrading.md"),
|
||||||
Page("Capabilities", "README.md", ("Capabilities",)),
|
Page("Capabilities", "README.md", ("Capabilities",)),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Translations (ADR-0001): `<Page>.<code>` written by hand in wiki/.
|
# Translations (ADR-0001): `<Page>.<code>` written by hand in docs/wiki/.
|
||||||
LANGUAGES: tuple[tuple[str, str], ...] = (("da", "Dansk"), ("ms", "Bahasa Melayu"))
|
LANGUAGES: tuple[tuple[str, str], ...] = (("da", "Dansk"), ("ms", "Bahasa Melayu"))
|
||||||
HASH_LENGTH = 12
|
HASH_LENGTH = 12
|
||||||
_TRANSLATION_HEADER = re.compile(
|
_TRANSLATION_HEADER = re.compile(
|
||||||
@@ -62,6 +64,8 @@ _PAGE_FOR_SOURCE = {
|
|||||||
"guides/credentials.md": "Credentials",
|
"guides/credentials.md": "Credentials",
|
||||||
"guides/troubleshooting.md": "Troubleshooting",
|
"guides/troubleshooting.md": "Troubleshooting",
|
||||||
"guides/quality-checks.md": "QualityChecksPythonShell",
|
"guides/quality-checks.md": "QualityChecksPythonShell",
|
||||||
|
"guides/quality-checks-cpp.md": "QualityChecksCpp",
|
||||||
|
"guides/quality-checks-csharp.md": "QualityChecksCSharp",
|
||||||
"guides/upgrading.md": "Upgrading",
|
"guides/upgrading.md": "Upgrading",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,9 +191,9 @@ def render_page(page: Page, repo_root: Path = REPO_ROOT) -> str:
|
|||||||
# Link text of the sidebar: English, then one list per translation code.
|
# Link text of the sidebar: English, then one list per translation code.
|
||||||
SIDEBAR_TITLE = "TirSystem GitHub Actions"
|
SIDEBAR_TITLE = "TirSystem GitHub Actions"
|
||||||
SIDEBAR_LABELS: dict[str, tuple[str, ...]] = {
|
SIDEBAR_LABELS: dict[str, tuple[str, ...]] = {
|
||||||
"en": ("Home", "Onboarding", "Credentials", "Troubleshooting", "Quality checks (Python, shell)", "Upgrading", "Capabilities"),
|
"en": ("Home", "Onboarding", "Credentials", "Troubleshooting", "Quality checks (Python, shell)", "Quality checks (C and C++)", "Quality checks (C#)", "Upgrading", "Capabilities"),
|
||||||
"da": ("Hjem", "Tilslutning", "Credentials", "Fejlfinding", "Kvalitetskontrol (Python, shell)", "Opgradering", "Kapabiliteter"),
|
"da": ("Hjem", "Tilslutning", "Credentials", "Fejlfinding", "Kvalitetskontrol (Python, shell)", "Kvalitetskontrol (C og C++)", "Kvalitetskontrol (C#)", "Opgradering", "Kapabiliteter"),
|
||||||
"ms": ("Utama", "Menyertakan", "Kelayakan", "Diagnosis", "Semakan kualiti (Python, shell)", "Menaik taraf", "Keupayaan"),
|
"ms": ("Utama", "Menyertakan", "Kelayakan", "Diagnosis", "Semakan kualiti (Python, shell)", "Semakan kualiti (C dan C++)", "Semakan kualiti (C#)", "Menaik taraf", "Keupayaan"),
|
||||||
}
|
}
|
||||||
SIDEBAR_NAME = "_Sidebar.md"
|
SIDEBAR_NAME = "_Sidebar.md"
|
||||||
|
|
||||||
@@ -300,9 +304,9 @@ def main(argv: list[str] | None = None) -> int:
|
|||||||
if args.check:
|
if args.check:
|
||||||
problems = check_pages() + check_translations()
|
problems = check_pages() + check_translations()
|
||||||
for problem in problems:
|
for problem in problems:
|
||||||
print(f"ERROR: wiki/{problem}", file=sys.stderr)
|
print(f"ERROR: docs/wiki/{problem}", file=sys.stderr)
|
||||||
if problems:
|
if problems:
|
||||||
print(f"Run `python {GENERATOR}` and commit wiki/.", file=sys.stderr)
|
print(f"Run `python {GENERATOR}` and commit docs/wiki/.", file=sys.stderr)
|
||||||
return 1
|
return 1
|
||||||
print("Wiki pages are up to date.")
|
print("Wiki pages are up to date.")
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
+33
-29
@@ -1,15 +1,15 @@
|
|||||||
"""Publish the pages in wiki/ to the Gitea wiki of the repository.
|
"""Publish the pages of a folder to the Gitea wiki of the repository.
|
||||||
|
|
||||||
Run by the scoped workflow publish-wiki.yml, which checks out the repository
|
Run by the reusable workflow publish-wiki-pages.yml, which a repository calls
|
||||||
that owns the wiki and this repository, and runs this file (MIL-004 task 6).
|
(ADR-0009). The caller is the opt-in: the workflow sets WIKI_PRUNE and the
|
||||||
A repository publishes only when it has opted in with wiki/.publish
|
folder must exist. It reads its settings from the environment:
|
||||||
(ADR-0004); the word prune in that file lets the run delete wiki pages that
|
|
||||||
are not in wiki/. It reads its settings from the environment:
|
|
||||||
|
|
||||||
GITEA_API_URL Gitea API base, for example https://host/api/v1
|
GITEA_API_URL Gitea API base, for example https://host/api/v1
|
||||||
SOURCE_REPOSITORY owner/repo of the repository whose wiki is written
|
SOURCE_REPOSITORY owner/repo of the repository whose wiki is written
|
||||||
WIKI_CREDENTIALS the Gitea token, as clear text (TOKEN_FOR_GITEA_WIKI)
|
WIKI_CREDENTIALS the Gitea token, as clear text (TOKEN_FOR_GITEA_WIKI)
|
||||||
WIKI_DIR directory with the pages (default: wiki)
|
WIKI_DIR directory with the pages (default: docs/wiki)
|
||||||
|
WIKI_PRUNE true or false, required: delete pages that are not in
|
||||||
|
the folder
|
||||||
|
|
||||||
Every failure is printed as ``ERROR: [category] message`` with the categories
|
Every failure is printed as ``ERROR: [category] message`` with the categories
|
||||||
configuration, credentials, permissions and api; no secret value is printed.
|
configuration, credentials, permissions and api; no secret value is printed.
|
||||||
@@ -28,8 +28,7 @@ from pathlib import Path
|
|||||||
PAGE_LIMIT = 50
|
PAGE_LIMIT = 50
|
||||||
REQUEST_TIMEOUT_SECONDS = 30
|
REQUEST_TIMEOUT_SECONDS = 30
|
||||||
COMMIT_MESSAGE = "Publish wiki from the repository"
|
COMMIT_MESSAGE = "Publish wiki from the repository"
|
||||||
MARKER_NAME = ".publish"
|
DEFAULT_WIKI_DIR = "docs/wiki"
|
||||||
PRUNE_WORD = "prune"
|
|
||||||
|
|
||||||
|
|
||||||
class WorkflowError(RuntimeError):
|
class WorkflowError(RuntimeError):
|
||||||
@@ -77,16 +76,13 @@ def request_json(url, method="GET", headers=None, body=None):
|
|||||||
raise WorkflowError("api", f"Gitea API is unreachable ({error}).") from None
|
raise WorkflowError("api", f"Gitea API is unreachable ({error}).") from None
|
||||||
|
|
||||||
|
|
||||||
def parse_marker(text):
|
def parse_prune_setting(text):
|
||||||
"""Return True when the marker asks for pruning, False when it is empty."""
|
"""Return the boolean of the WIKI_PRUNE input: true or false, nothing else."""
|
||||||
word = (text or "").strip()
|
word = (text or "").strip().lower()
|
||||||
if not word:
|
if word in ("true", "false"):
|
||||||
return False
|
return word == "true"
|
||||||
if word == PRUNE_WORD:
|
|
||||||
return True
|
|
||||||
raise WorkflowError(
|
raise WorkflowError(
|
||||||
"configuration",
|
"configuration", f"The prune input must be 'true' or 'false', not '{(text or '').strip()}'."
|
||||||
f"wiki/{MARKER_NAME} may only be empty or contain the word '{PRUNE_WORD}'.",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -135,6 +131,16 @@ def page_key(title):
|
|||||||
return str(title).replace(" ", "-")
|
return str(title).replace(" ", "-")
|
||||||
|
|
||||||
|
|
||||||
|
def page_title(key):
|
||||||
|
"""Return the title to send to Gitea for a page key.
|
||||||
|
|
||||||
|
A hyphen in a title is a literal hyphen to Gitea, which then stores the page
|
||||||
|
as Home-da.-.md and addresses it as Home%2Dda, so a link to Home-da finds
|
||||||
|
nothing. A space is stored as a hyphen (Home-da.md) and addressed as Home-da.
|
||||||
|
"""
|
||||||
|
return key.replace("-", " ")
|
||||||
|
|
||||||
|
|
||||||
def read_pages(wiki_dir):
|
def read_pages(wiki_dir):
|
||||||
"""Return {page key: content} for every Markdown file in wiki_dir."""
|
"""Return {page key: content} for every Markdown file in wiki_dir."""
|
||||||
pages = {}
|
pages = {}
|
||||||
@@ -207,7 +213,7 @@ def publish(pages, wiki_url, headers, send, prune):
|
|||||||
result = {"created": [], "updated": [], "deleted": [], "kept": []}
|
result = {"created": [], "updated": [], "deleted": [], "kept": []}
|
||||||
for title, content in pages.items():
|
for title, content in pages.items():
|
||||||
body = {
|
body = {
|
||||||
"title": title,
|
"title": page_title(title),
|
||||||
"content_base64": base64.b64encode(content).decode("ascii"),
|
"content_base64": base64.b64encode(content).decode("ascii"),
|
||||||
"message": COMMIT_MESSAGE,
|
"message": COMMIT_MESSAGE,
|
||||||
}
|
}
|
||||||
@@ -230,17 +236,16 @@ def publish(pages, wiki_url, headers, send, prune):
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
wiki_dir = Path(os.environ.get("WIKI_DIR", "wiki"))
|
wiki_dir = Path(os.environ.get("WIKI_DIR", DEFAULT_WIKI_DIR))
|
||||||
owner, repo = split_repository(os.environ.get("SOURCE_REPOSITORY"))
|
owner, repo = split_repository(os.environ.get("SOURCE_REPOSITORY"))
|
||||||
|
|
||||||
marker = wiki_dir / MARKER_NAME
|
prune = parse_prune_setting(os.environ.get("WIKI_PRUNE"))
|
||||||
if not marker.is_file():
|
if not wiki_dir.is_dir():
|
||||||
print(
|
raise WorkflowError(
|
||||||
f"No {wiki_dir}/{MARKER_NAME} marker in {owner}/{repo}; "
|
"configuration",
|
||||||
"wiki publishing is not enabled for this repository."
|
f"The wiki folder {wiki_dir} does not exist in {owner}/{repo}; "
|
||||||
|
"set the wiki_dir input to the folder with the pages.",
|
||||||
)
|
)
|
||||||
return 0
|
|
||||||
prune = parse_marker(marker.read_text(encoding="utf-8"))
|
|
||||||
|
|
||||||
pages = read_pages(wiki_dir)
|
pages = read_pages(wiki_dir)
|
||||||
token = parse_gitea_token(os.environ.get("WIKI_CREDENTIALS"))
|
token = parse_gitea_token(os.environ.get("WIKI_CREDENTIALS"))
|
||||||
@@ -282,8 +287,7 @@ def main():
|
|||||||
if result["kept"]:
|
if result["kept"]:
|
||||||
print(
|
print(
|
||||||
f"{len(result['kept'])} page(s) are in the wiki but not in "
|
f"{len(result['kept'])} page(s) are in the wiki but not in "
|
||||||
f"{wiki_dir}/ and were kept; put the word '{PRUNE_WORD}' in "
|
f"{wiki_dir}/ and were kept; set the prune input to true to delete them."
|
||||||
f"{wiki_dir}/{MARKER_NAME} to delete them."
|
|
||||||
)
|
)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
+30
-11
@@ -13,6 +13,7 @@
|
|||||||
# Every failure is printed as ::error::[category] message.
|
# Every failure is printed as ::error::[category] message.
|
||||||
|
|
||||||
C_STANDARD="${C_STANDARD:-c17}"
|
C_STANDARD="${C_STANDARD:-c17}"
|
||||||
|
DEFAULT_TIDY_CHECKS="clang-diagnostic-*,clang-analyzer-*"
|
||||||
|
|
||||||
validate_inputs() {
|
validate_inputs() {
|
||||||
set -u
|
set -u
|
||||||
@@ -50,16 +51,19 @@ install_tools() {
|
|||||||
"clang-format==${CLANG_FORMAT_VERSION}" "clang-tidy==${CLANG_TIDY_VERSION}"
|
"clang-format==${CLANG_FORMAT_VERSION}" "clang-tidy==${CLANG_TIDY_VERSION}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# A .clang-format must exist in the working directory or above it, up to the
|
# Succeeds when one of the named files exists in the working directory or above
|
||||||
# top of the repository: clang-format finds its style the same way.
|
# it, up to the top of the repository: clang-format and clang-tidy find their
|
||||||
find_clang_format_config() {
|
# configuration the same way.
|
||||||
local top dir parent
|
find_config_upwards() {
|
||||||
|
local top dir parent name
|
||||||
top="$(cd "$(git rev-parse --show-toplevel)" && pwd -P)"
|
top="$(cd "$(git rev-parse --show-toplevel)" && pwd -P)"
|
||||||
dir="$(pwd -P)"
|
dir="$(pwd -P)"
|
||||||
while true; do
|
while true; do
|
||||||
if [ -f "$dir/.clang-format" ] || [ -f "$dir/_clang-format" ]; then
|
for name in "$@"; do
|
||||||
|
if [ -f "$dir/$name" ]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
parent="$(dirname "$dir")"
|
parent="$(dirname "$dir")"
|
||||||
# stop at the top of the repository, or at the file system root
|
# stop at the top of the repository, or at the file system root
|
||||||
if [ "$dir" = "$top" ] || [ "$parent" = "$dir" ]; then
|
if [ "$dir" = "$top" ] || [ "$parent" = "$dir" ]; then
|
||||||
@@ -76,6 +80,12 @@ run_checks() {
|
|||||||
echo "::error::[configuration] working-directory '$WORKING_DIRECTORY' does not exist."
|
echo "::error::[configuration] working-directory '$WORKING_DIRECTORY' does not exist."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
# compile-commands-dir is relative to the repository root, not to the working directory
|
||||||
|
local repo_top compile_db=""
|
||||||
|
repo_top="$(cd "$(git rev-parse --show-toplevel)" && pwd -P)"
|
||||||
|
if [ -n "$COMPILE_COMMANDS_DIR" ]; then
|
||||||
|
compile_db="$repo_top/$COMPILE_COMMANDS_DIR"
|
||||||
|
fi
|
||||||
cd "$WORKING_DIRECTORY"
|
cd "$WORKING_DIRECTORY"
|
||||||
|
|
||||||
local all_files cpp_files c_files
|
local all_files cpp_files c_files
|
||||||
@@ -85,11 +95,11 @@ run_checks() {
|
|||||||
echo "All selected checks passed."
|
echo "All selected checks passed."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if ! find_clang_format_config; then
|
if ! find_config_upwards .clang-format _clang-format; then
|
||||||
echo "::error::[configuration] No .clang-format found in '$WORKING_DIRECTORY' or above it; add the style of the project."
|
echo "::error::[configuration] No .clang-format found in '$WORKING_DIRECTORY' or above it; add the style of the project."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ -n "$COMPILE_COMMANDS_DIR" ] && [ ! -f "$COMPILE_COMMANDS_DIR/compile_commands.json" ]; then
|
if [ -n "$compile_db" ] && [ ! -f "$compile_db/compile_commands.json" ]; then
|
||||||
echo "::error::[configuration] compile-commands-dir '$COMPILE_COMMANDS_DIR' has no compile_commands.json; build it before the call."
|
echo "::error::[configuration] compile-commands-dir '$COMPILE_COMMANDS_DIR' has no compile_commands.json; build it before the call."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -115,14 +125,23 @@ run_checks() {
|
|||||||
|
|
||||||
run_tool "clang-format" "$QC_BIN/clang-format" --dry-run -Werror "${all_files[@]}"
|
run_tool "clang-format" "$QC_BIN/clang-format" --dry-run -Werror "${all_files[@]}"
|
||||||
|
|
||||||
if [ -n "$COMPILE_COMMANDS_DIR" ]; then
|
# Without a .clang-tidy, clang-tidy enables no check and refuses to run, so
|
||||||
run_tool "clang-tidy" "$QC_BIN/clang-tidy" --quiet -p "$COMPILE_COMMANDS_DIR" "${all_files[@]}"
|
# the project gets the compiler diagnostics and the static analyzer.
|
||||||
|
# clang-tidy exits 0 on a warning, so every finding is made an error: a
|
||||||
|
# finding must fail the check, as a failing tool does for the other languages.
|
||||||
|
local tidy_args=(--quiet "--warnings-as-errors=*")
|
||||||
|
if ! find_config_upwards .clang-tidy _clang-tidy; then
|
||||||
|
tidy_args+=("--checks=${DEFAULT_TIDY_CHECKS}")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$compile_db" ]; then
|
||||||
|
run_tool "clang-tidy" "$QC_BIN/clang-tidy" "${tidy_args[@]}" -p "$compile_db" "${all_files[@]}"
|
||||||
else
|
else
|
||||||
if [ "${#cpp_files[@]}" -gt 0 ]; then
|
if [ "${#cpp_files[@]}" -gt 0 ]; then
|
||||||
run_tool "clang-tidy (C++)" "$QC_BIN/clang-tidy" --quiet "${cpp_files[@]}" -- "-std=${STD}"
|
run_tool "clang-tidy (C++)" "$QC_BIN/clang-tidy" "${tidy_args[@]}" "${cpp_files[@]}" -- "-std=${STD}"
|
||||||
fi
|
fi
|
||||||
if [ "${#c_files[@]}" -gt 0 ]; then
|
if [ "${#c_files[@]}" -gt 0 ]; then
|
||||||
run_tool "clang-tidy (C)" "$QC_BIN/clang-tidy" --quiet "${c_files[@]}" -- "-std=${C_STANDARD}"
|
run_tool "clang-tidy (C)" "$QC_BIN/clang-tidy" "${tidy_args[@]}" "${c_files[@]}" -- "-std=${C_STANDARD}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
prune
|
|
||||||
Reference in New Issue
Block a user