Use bare tokens: PAT_FOR_GITHUB replaces CREDENTIALS_FOR_GITHUB #51

Merged
Tirsvad merged 4 commits from pat-for-github into main 2026-10-10 04:44:41 +02:00
Owner

Replaces the JSON secret CREDENTIALS_FOR_GITHUB with the bare token PAT_FOR_GITHUB, and drops JSON from the Gitea token secrets too.

Changes

  • .gitea/scoped_workflows/sync-github-metadata.yml reads secrets.PAT_FOR_GITHUB as clear text. parse_github_token and parse_gitea_token only check that the value is not empty; the JSON handling and the re import are gone.
  • tools/publish_wiki.py: parse_gitea_token follows the same rule.
  • Tests updated (130 pass): the JSON cases are replaced by stripped-token and missing-or-empty cases.
  • README.md, guides/credentials.md, guides/onboarding.md and guides/troubleshooting.md describe bare tokens; the obsolete JSON troubleshooting rows are removed.
  • PP-001 UC candidate 2 names PAT_FOR_GITHUB (new Proposed row, see below).

Wiki pages changed (rule 8)

English: Home, Onboarding, Credentials, Troubleshooting, Capabilities. Danish and Bahasa Malaysia: the same five (retranslated; structure unchanged apart from removed JSON rows and the removed JSON code block).

Before merging

  • PAT_FOR_GITHUB must be stored first, at organisation level or in this repository, holding only the token. It does not exist yet (checked: only CREDENTIALS_FOR_GITHUB, TOKEN_FOR_GITEA and TOKEN_FOR_GITEA_WIKI). Without it every push to main runs the sync and fails with [configuration] PAT_FOR_GITHUB is missing or empty.
  • TOKEN_FOR_GITEA and TOKEN_FOR_GITEA_WIKI must hold the bare token; a value that is still JSON is sent as is and gets a 401.
  • CREDENTIALS_FOR_GITHUB can be deleted afterwards; nothing reads it.

Review status

  • PP-001 is Accepted (RC-015, QC: none exists for the Project Plan, so it is validated against the Business Case and the milestones). Go, S01 standing in as ADR-0002 records.
  • Two findings were fixed in the same review: UC candidate 2 no longer lists "malformed JSON" as a failure, and the answered MIL-001 decisions are removed from Open Issues.
  • TM-001 lists RC-015.

Refs #12

Replaces the JSON secret `CREDENTIALS_FOR_GITHUB` with the bare token `PAT_FOR_GITHUB`, and drops JSON from the Gitea token secrets too. ## Changes - `.gitea/scoped_workflows/sync-github-metadata.yml` reads `secrets.PAT_FOR_GITHUB` as clear text. `parse_github_token` and `parse_gitea_token` only check that the value is not empty; the JSON handling and the `re` import are gone. - `tools/publish_wiki.py`: `parse_gitea_token` follows the same rule. - Tests updated (130 pass): the JSON cases are replaced by stripped-token and missing-or-empty cases. - `README.md`, `guides/credentials.md`, `guides/onboarding.md` and `guides/troubleshooting.md` describe bare tokens; the obsolete JSON troubleshooting rows are removed. - PP-001 UC candidate 2 names `PAT_FOR_GITHUB` (new `Proposed` row, see below). ## Wiki pages changed (rule 8) English: Home, Onboarding, Credentials, Troubleshooting, Capabilities. Danish and Bahasa Malaysia: the same five (retranslated; structure unchanged apart from removed JSON rows and the removed JSON code block). ## Before merging - **`PAT_FOR_GITHUB` must be stored first**, at organisation level or in this repository, holding only the token. It does not exist yet (checked: only `CREDENTIALS_FOR_GITHUB`, `TOKEN_FOR_GITEA` and `TOKEN_FOR_GITEA_WIKI`). Without it every push to `main` runs the sync and fails with `[configuration] PAT_FOR_GITHUB is missing or empty.` - `TOKEN_FOR_GITEA` and `TOKEN_FOR_GITEA_WIKI` must hold the bare token; a value that is still JSON is sent as is and gets a 401. - `CREDENTIALS_FOR_GITHUB` can be deleted afterwards; nothing reads it. ## Review status - PP-001 is `Accepted` (RC-015, QC: none exists for the Project Plan, so it is validated against the Business Case and the milestones). Go, S01 standing in as ADR-0002 records. - Two findings were fixed in the same review: UC candidate 2 no longer lists "malformed JSON" as a failure, and the answered MIL-001 decisions are removed from Open Issues. - TM-001 lists RC-015. Refs #12
Tirsvad added 2 commits 2026-10-10 04:42:10 +02:00
The sync workflow reads secrets.PAT_FOR_GITHUB as clear text and
parse_github_token and parse_gitea_token only check that the value is not
empty. No secret is JSON any more; the wiki publisher follows. Update the
tests, the guides, the README, PP-001 UC candidate 2 and the wiki pages with
their Danish and Bahasa Malaysia translations.

Task: MIL-002#5
Resolve pending commit link in PP-001
Validate workflows / validate (pull_request) Successful in 13s
ebf9ce9a1c
Tirsvad added 2 commits 2026-10-10 04:44:07 +02:00
Add review record RC-015, remove JSON from the credential failures of UC
candidate 2 and the answered MIL-001 items from Open Issues, accept PP-001
and update TM-001.
Resolve pending commit links in PP-001, RC-015 and TM-001
Validate workflows / validate (pull_request) Successful in 12s
0439867e89
Tirsvad merged commit 7b37e40a79 into main 2026-10-10 04:44:41 +02:00
Tirsvad deleted branch pat-for-github 2026-10-10 04:44:42 +02:00
Sign in to join this conversation.