feat: edit API token scopes + standardize workflow tokens #700

Merged
jmiller merged 2 commits from feature/edit-token-scopes into main 2026-06-25 16:25:18 +00:00
Owner

Summary

  • Add ability to edit API token scopes via PATCH endpoint and web UI edit button (#697)
  • Reject empty token scope update requests with 400 instead of silently succeeding
  • Standardize all workflow token references from GA_TOKEN to MOKOGITEA_TOKEN
  • Fix pr-check.yml pre-release dispatch silent auth failure (env var / curl reference mismatch)

Changes

  • API: PATCH /api/v1/users/{username}/tokens/{id} to update token scopes
  • Web UI: Edit button on Settings > Applications with scope checkboxes
  • Workflows: 7 files updated from GA_TOKEN to MOKOGITEA_TOKEN
  • Validation: Empty scope list rejected at API layer

Test plan

  • Edit token scopes via API: PATCH with new scope list returns updated token
  • Edit token scopes via UI: click edit, change checkboxes, save
  • Empty scope PATCH returns 400 error
  • Workflow token auth: verify pr-check pre-release dispatch authenticates correctly
## Summary - Add ability to edit API token scopes via PATCH endpoint and web UI edit button (#697) - Reject empty token scope update requests with 400 instead of silently succeeding - Standardize all workflow token references from GA_TOKEN to MOKOGITEA_TOKEN - Fix pr-check.yml pre-release dispatch silent auth failure (env var / curl reference mismatch) ## Changes - **API**: `PATCH /api/v1/users/{username}/tokens/{id}` to update token scopes - **Web UI**: Edit button on Settings > Applications with scope checkboxes - **Workflows**: 7 files updated from GA_TOKEN to MOKOGITEA_TOKEN - **Validation**: Empty scope list rejected at API layer ## Test plan - [ ] Edit token scopes via API: PATCH with new scope list returns updated token - [ ] Edit token scopes via UI: click edit, change checkboxes, save - [ ] Empty scope PATCH returns 400 error - [ ] Workflow token auth: verify pr-check pre-release dispatch authenticates correctly
jmiller added 2 commits 2026-06-25 16:24:17 +00:00
Replace all GA_TOKEN secret references with MOKOGITEA_TOKEN across 7
workflow files. Fixes pr-check.yml pre-release dispatch which set env
var GA_TOKEN but curl referenced GITEA_TOKEN, silently failing auth.
Also removes duplicate fallback chains in deploy-manual, repo-health,
and version-set.
docs: add changelog entries for token standardization and validation fix
Universal: Auto Version Bump / Version Bump (push) Successful in 14s
Universal: PR Check / Branch Policy (pull_request) Failing after 1s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 2s
Universal: PR Check / Validate PR (pull_request) Failing after 8s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Failing after 1s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Failing after 4s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
PR RC Release / Build RC Release (pull_request) Failing after 1m18s
Universal: PR Check / Secret Scan (pull_request) Successful in 1m18s
Universal: Build & Release / Build & Release Pipeline (pull_request) Failing after 59s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
5c1b4e6509
jmiller merged commit 8798ccb478 into main 2026-06-25 16:25:18 +00:00
jmiller deleted branch feature/edit-token-scopes 2026-06-25 16:25:19 +00:00
Sign in to join this conversation.