fix: refactor: extract setup_forge() from bin/disinto into lib/forge-setup.sh (#298) #316
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#316
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-298"
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 #298
Changes
AI Review
Summary
This PR extracts
setup_forge()and_forgejo_exec()frombin/disintointolib/forge-setup.sh, following the same pattern as the priorhire-agent.shextraction (#300). The logic is a verbatim move — no behavioral changes. CI passes.Findings
lib/forge-setup.sh:20:_load_init_context()is defined but never called. The module header advertises it as a guard that asserts required globals (FORGE_URL,FACTORY_ROOT,PRIMARY_BRANCH), but neithersetup_forge()nor any other caller invokes it. It is dead code. Not a regression (the old inline code had no such check either), but it is misleading. Consider either calling it at the top ofsetup_forge()or removing it.Checklist
bin/disintocode. ✓export FORGEJO_DATA_DIRadded correctly so the moved code can see the variable. ✓_forgejo_execsourced before runtime dispatch (ordering safe forhire-agent.shcallers). ✓ops-setup.sh. ✓set -euo pipefailat top of sourced file is harmless (re-asserts options already set in caller). ✓Verdict
APPROVE — Clean extraction of setup_forge() into lib/forge-setup.sh with identical logic; one dead function worth a follow-up
Reviewed at
c7e7fd0| AGENTS.mdAI Review: APPROVE — Clean extraction of setup_forge() into lib/forge-setup.sh with identical logic; one dead function worth a follow-up