feat(org): add org-level branch protection rulesets & configurable help URLs #72
Reference in New Issue
Block a user
Delete Branch "feature/org-branch-protection"
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
GET/POST/PATCH/DELETE /api/v1/orgs/{org}/branch_protectionsHELP_URLandSUPPORT_URLsettings (replaces hardcoded docs.gitea.com)1261.xx.xxversion convention for MokoGitea forkChanges
Org Branch Protection (8 files)
org_protected_branchtableOrgProtectedBranchmodel with CRUD + glob matchingreqToken() + reqOrgOwnership()authGetFirstMatchProtectedBranchRule()InheritedFromfield onBranchProtectionAPI responseHelp/Support URLs (7 files)
HELP_URL/SUPPORT_URLinapp.iniglobal section{{HelpURL}}template function instead of hardcoded URLTest plan
HELP_URLin app.ini, verify navbar links updateCloses #38
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
Add organization-scoped branch protection rules that cascade to all repos within the org. Repo-level rules take precedence; org rules serve as the fallback when no repo rule matches a branch. - New table: org_protected_branch (migration v332) - OrgProtectedBranch model with full CRUD operations - API endpoints: GET/POST/PATCH/DELETE /api/v1/orgs/{org}/branch_protections - Inheritance via GetFirstMatchProtectedBranchRule() fallback - InheritedFrom field added to BranchProtection API response - Org rules use team-based whitelists (no per-user IDs at org level) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>