gitea.tea/cmd/actions
Ross Golder 50bcc1a49d
fix(actions): validate secret name and value on create
`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.
2026-09-05 09:52:00 +07:00
..
runs Move sdk from code.gitea.io/sdk/gitea to gitea.dev/sdk (#1006) 2026-05-26 04:51:09 +00:00
secrets fix(actions): validate secret name and value on create 2026-09-05 09:52:00 +07:00
variables Move sdk from code.gitea.io/sdk/gitea to gitea.dev/sdk (#1006) 2026-05-26 04:51:09 +00:00
workflows Move sdk from code.gitea.io/sdk/gitea to gitea.dev/sdk (#1006) 2026-05-26 04:51:09 +00:00
runs.go update import path to use gitea.dev (#1003) 2026-05-23 17:26:43 +00:00
secrets.go update import path to use gitea.dev (#1003) 2026-05-23 17:26:43 +00:00
variables.go update import path to use gitea.dev (#1003) 2026-05-23 17:26:43 +00:00
workflows.go update import path to use gitea.dev (#1003) 2026-05-23 17:26:43 +00:00