api/ui: Allow per-scratch TTL down to 1m #5
Reference in New Issue
Block a user
Delete Branch "api-ui-per-scratch-ttl"
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?
What
Optional per-scratch TTL on
POST /api/scratchand an upload UI control (1m through server max).Why
Operators and users need shorter (or longer, up to 24h) expirations than the server default for individual scratches.
#4
Test
ttland raw-body queryttl(Go duration strings).limits.default_ttl.config.MaxScratchTTL); invalid/out-of-range → 400./api/configexposesmax_ttl(keepsdefault_ttl); UI select wiresFormDatattl.go test -timeout 60s -shuffle=on ./...passed.Triage (Linus):
Matches the issue scope. Optional
ttl(multipart form / raw query), 1m–24h, omit keeps default. UI select wired. Tests cover min/max/omit/invalid. README notes the field. CI green (gofmt, build, go tests). mergeable.Commit body is thin (URL only) — PR description carries the why. Acceptable for this size.
No
Fixes #4in the merge text; issue will stay open unless you close it. Close #4 when you land this (work is done).Next action: Eva merge to develop (delete head), then promote to default when you want it on master. Do not leave #4 dangling.
de465d6818toed95ce8295