mirror of
https://gitea.com/gitea/tea.git
synced 2026-09-10 07:26:33 -04:00
`runSecretsCreate` previously accepted any string as a secret name and value, forwarding invalid input directly to the Gitea API. The API either rejected with a generic error or accepted inputs that don't match Gitea's documented constraints, producing confusing UX. Add `validateSecretName` enforcing the Gitea Actions naming rules: uppercase letters, numbers, and underscores only; cannot start with a number; cannot use the reserved `GITHUB_` / `GITEA_` prefixes. Add `validateSecretValue` enforcing a non-empty value with a 64KB upper bound (matches the Gitea API limit). Mirror the structure of the existing variable validation in `cmd/actions/variables/set.go` for consistency. |
||
|---|---|---|
| .. | ||
| runs | ||
| secrets | ||
| variables | ||
| workflows | ||
| runs.go | ||
| secrets.go | ||
| variables.go | ||
| workflows.go | ||