ci(sop-checklist-gate): prefer secrets.GITEA_TOKEN over GITHUB_TOKEN #8
Reference in New Issue
Block a user
Delete Branch "ci/sop-gitea-token"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Mirrors molecule-app#90.
secrets.GITEA_TOKENto the token fallback chain beforesecrets.GITHUB_TOKEN.GITHUB_TOKENcurrently lackswrite:repository(app#87).No runtime behavior change until a repo-scoped
GITEA_TOKENsecret is provisioned.Test plan
SOP checklist
GITHUB_TOKENin Gitea Actions lackswrite:repository, so prefer repo-scopedGITEA_TOKENwhen provisioned.GITHUB_TOKENfallback remains unchanged.GITEA_TOKENfallback pattern.APPROVED: 5-axis review. Correctness: the fallback order now preserves the existing privileged SOP_CHECKLIST_GATE_TOKEN/SOP_TIER_CHECK_TOKEN/RFC_324_TEAM_READ_TOKEN precedence, then tries repo-scoped secrets.GITEA_TOKEN before falling back to the weaker auto-injected GITHUB_TOKEN, matching the approved molecule-app#90 pattern. Tests/CI: workflow-only change; observed existing status contexts through the API, and this does not add a runtime code path. Security: no token is printed, passed to shell expansion beyond the existing GITEA_TOKEN env consumed by the gate, or exposed to new third-party actions; it only selects a better-scoped secret when provisioned. Scope/backcompat: no-op until GITEA_TOKEN exists, with GITHUB_TOKEN fallback retained. Ops: reduces the known sop-checklist auth failure mode without changing checklist semantics.
APPROVED: 5-axis review complete. Correctness: the change matches molecule-app#90 and places secrets.GITEA_TOKEN before secrets.GITHUB_TOKEN while preserving the higher-precedence dedicated gate tokens. Robustness: repos without GITEA_TOKEN retain the previous GITHUB_TOKEN fallback. Security: no new token exposure surface; the workflow already passed this value through the GITEA_TOKEN env for the gate, now with a better-scoped repo secret option. Performance: no impact. Readability/scope: one-line workflow-only change, otherwise no-op. Note: CI/all-required is green; sop-checklist-gate is red due missing SOP checklist/process state, not a defect in this fallback ordering.