fix: feat: disinto init should set up branch protection on Forgejo (#10) #161
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#161
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-10"
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?
Fixes #10
Changes
AI Review
Summary\n\nAdds
setup_project_branch_protectiontolib/branch-protection.shand calls it duringdisinto init. The new function mirrors the existingsetup_profile_branch_protectionpattern but with factory-appropriate settings: merge whitelist restricted todev-bot(instead ofadmin_enforced: true) so dev-bot can auto-merge after CI+review.\n\n### Correctness\n\n-branch-protection.shis already sourced at line 1947 before the new call at line 1991 — function is available\n-$forge_repoand$branchare both set before line 1991 (detected at 1930–1934, used throughout)\n-FORGE_OPS_REPOis unset at line 1953 before the new call, butsetup_project_branch_protectiondoesn't use it — no issue\n-FORGE_TOKEN/FORGE_URLare loaded viaenv.shat line 1946 and remain in scope\n- Failure is non-blocking (warning to stderr), consistent with how vault branch protection is handled above it\n\n### Design\n\n-enable_merge_whitelist: true+merge_whitelist_usernames: ["dev-bot"]is the correct differentiation from vault/ops repos (which useadmin_enforced: true). Project repos need dev-bot to auto-merge.\n- Create vs. update (POST vs. PUT) handled correctly, same as sibling functions\n- Log line "review-bot can approve: yes" is accurate — no approval whitelist is set, so any collaborator (including review-bot) can approve by default\n- CLIsetup-projectsubcommand added consistently alongsidesetup-profile\n\n### No issues foundVerdict
APPROVE — Correct implementation of project branch protection following established patterns; non-blocking failure handling is appropriate
Reviewed at
83ce8a7| AGENTS.mdAI Review: APPROVE — Correct implementation of project branch protection following established patterns; non-blocking failure handling is appropriate