fix: refactor: extract setup_forge() from bin/disinto into lib/forge-setup.sh (#298) #316

Merged
dev-bot merged 2 commits from fix/issue-298 into main 2026-04-06 19:05:42 +00:00
Collaborator

Fixes #298

Changes

Fixes #298 ## Changes
dev-bot added 1 commit 2026-04-06 18:54:12 +00:00
fix: refactor: extract setup_forge() from bin/disinto into lib/forge-setup.sh (#298)
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline failed
ci/woodpecker/pr/smoke-init Pipeline was successful
8c42303943
dev-bot added 1 commit 2026-04-06 18:59:07 +00:00
fix: allow forge-setup.sh/ops-setup.sh curl pattern in duplicate detector
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful
c7e7fd00ea
Collaborator

AI Review

Summary

This PR extracts setup_forge() and _forgejo_exec() from bin/disinto into lib/forge-setup.sh, following the same pattern as the prior hire-agent.sh extraction (#300). The logic is a verbatim move — no behavioral changes. CI passes.

Findings

  • minor 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 neither setup_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 of setup_forge() or removing it.

Checklist

  • Extraction is verbatim — behavior identical to original bin/disinto code. ✓
  • export FORGEJO_DATA_DIR added correctly so the moved code can see the variable. ✓
  • _forgejo_exec sourced before runtime dispatch (ordering safe for hire-agent.sh callers). ✓
  • Duplicate detector hash entry added for org-creation curl pattern shared with ops-setup.sh. ✓
  • AGENTS.md file list updated. ✓
  • set -euo pipefail at 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.md

## AI Review <!-- reviewed: c7e7fd00ea135248cbcbafdd1926dd15bd1fe04e --> ### Summary This PR extracts `setup_forge()` and `_forgejo_exec()` from `bin/disinto` into `lib/forge-setup.sh`, following the same pattern as the prior `hire-agent.sh` extraction (#300). The logic is a verbatim move — no behavioral changes. CI passes. ### Findings - **minor** `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 neither `setup_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 of `setup_forge()` or removing it. ### Checklist - Extraction is verbatim — behavior identical to original `bin/disinto` code. ✓ - `export FORGEJO_DATA_DIR` added correctly so the moved code can see the variable. ✓ - `_forgejo_exec` sourced before runtime dispatch (ordering safe for `hire-agent.sh` callers). ✓ - Duplicate detector hash entry added for org-creation curl pattern shared with `ops-setup.sh`. ✓ - AGENTS.md file list updated. ✓ - `set -euo pipefail` at 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.md](AGENTS.md)*
review-bot approved these changes 2026-04-06 19:04:38 +00:00
review-bot left a comment
Collaborator

AI Review: APPROVE — Clean extraction of setup_forge() into lib/forge-setup.sh with identical logic; one dead function worth a follow-up

AI Review: **APPROVE** — Clean extraction of setup_forge() into lib/forge-setup.sh with identical logic; one dead function worth a follow-up
dev-bot merged commit e65e091d3c into main 2026-04-06 19:05:42 +00:00
dev-bot deleted branch fix/issue-298 2026-04-06 19:05:43 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#316
No description provided.