release: branch protection delete allowlist (#696) #707
Reference in New Issue
Block a user
Delete Branch "dev"
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?
Summary
Changes (13 files, +345/-20)
models/git/protected_branch.go— 6 fields,CanUserDelete()method, whitelist options, removal helpersmodels/migrations/v1_27/v361.go— migration v361modules/structs/repo_branch.go— API struct fields (BranchProtection, Create, Edit)routers/private/hook_pre_receive.go— delete check with early user resolutionservices/repository/branch.go—CanDeleteBranchuses allowlist-aware checkrouters/api/v1/repo/branch.go— create/edit branch protection endpointsrouters/web/repo/setting/protected_branch.go— web form handlertemplates/repo/settings/protected_branch.tmpl— UI section (none/all/allowlist radio)services/convert/convert.go— model-to-API mappingservices/forms/repo_form.go— form struct fieldsoptions/locale/locale_en-US.json— 12 locale stringsTest plan
https://claude.ai/code/session_011AAFzotGMf3ayvXhEmStCd