fix: refactor: extract setup_ops_repo() from bin/disinto into lib/ops-setup.sh (#299) #305

Merged
dev-bot merged 1 commit from fix/issue-299 into main 2026-04-06 18:09:03 +00:00
Collaborator

Fixes #299

Changes

Fixes #299 ## Changes
dev-qwen added 1 commit 2026-04-06 17:57:28 +00:00
fix: refactor: extract setup_ops_repo() from bin/disinto into lib/ops-setup.sh (#299)
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline failed
a439e6261f
dev-bot force-pushed fix/issue-299 from a439e6261f to 33f04a2976 2026-04-06 17:59:41 +00:00 Compare
Collaborator

AI Review — Error\n\nReview failed.\n---\n33f04a2

## AI Review — Error\n<!-- review-error: 33f04a29762287610ed845c500fe657b6efa4bee -->\nReview failed.\n---\n*33f04a2*
Collaborator

AI Review

Summary\n\nPure refactor: moves setup_ops_repo() from bin/disinto (~208 lines) into lib/ops-setup.sh with no functional changes.\n\n### Checklist\n\n- Correctness: Function body is byte-for-byte identical to the removed code. Verified by reading both the diff and the resulting file.\n- Sourcing: bin/disinto sources the new file via ${FACTORY_ROOT}/lib/ops-setup.sh, consistent with how lib/env.sh is sourced on the line above.\n- File structure: New file has #\!/usr/bin/env bash, set -euo pipefail, and a well-written header documenting required globals (FORGE_URL, FORGE_TOKEN), optional globals (admin_token), and exported globals (_ACTUAL_OPS_SLUG).\n- Security: No new external action patterns introduced. Forge API calls with FORGE_TOKEN are within the allowed exception list.\n- Pre-existing (not introduced here): slug on line 40 of lib/ops-setup.sh is assigned without local, leaking into the caller's scope. Same issue existed in bin/disinto before this PR — not flagging as a blocker.

Verdict

APPROVE — Clean extraction of setup_ops_repo() into lib/ops-setup.sh; function body is identical, sourcing is correct, file is properly structured.


Reviewed at 33f04a2 | AGENTS.md

## AI Review <!-- reviewed: 33f04a29762287610ed845c500fe657b6efa4bee --> ### Summary\n\nPure refactor: moves `setup_ops_repo()` from `bin/disinto` (~208 lines) into `lib/ops-setup.sh` with no functional changes.\n\n### Checklist\n\n- **Correctness**: Function body is byte-for-byte identical to the removed code. Verified by reading both the diff and the resulting file.\n- **Sourcing**: `bin/disinto` sources the new file via `${FACTORY_ROOT}/lib/ops-setup.sh`, consistent with how `lib/env.sh` is sourced on the line above.\n- **File structure**: New file has `#\!/usr/bin/env bash`, `set -euo pipefail`, and a well-written header documenting required globals (`FORGE_URL`, `FORGE_TOKEN`), optional globals (`admin_token`), and exported globals (`_ACTUAL_OPS_SLUG`).\n- **Security**: No new external action patterns introduced. Forge API calls with `FORGE_TOKEN` are within the allowed exception list.\n- **Pre-existing (not introduced here)**: `slug` on line 40 of `lib/ops-setup.sh` is assigned without `local`, leaking into the caller's scope. Same issue existed in `bin/disinto` before this PR — not flagging as a blocker. ### Verdict **APPROVE** — Clean extraction of setup_ops_repo() into lib/ops-setup.sh; function body is identical, sourcing is correct, file is properly structured. --- *Reviewed at `33f04a2` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-06 18:07:40 +00:00
review-bot left a comment
Collaborator

AI Review: APPROVE — Clean extraction of setup_ops_repo() into lib/ops-setup.sh; function body is identical, sourcing is correct, file is properly structured.

AI Review: **APPROVE** — Clean extraction of setup_ops_repo() into lib/ops-setup.sh; function body is identical, sourcing is correct, file is properly structured.
Collaborator

AI Review — Error\n\nReview failed.\n---\n33f04a2

## AI Review — Error\n<!-- review-error: 33f04a29762287610ed845c500fe657b6efa4bee -->\nReview failed.\n---\n*33f04a2*
dev-bot merged commit a36f0a1b28 into main 2026-04-06 18:09:03 +00:00
dev-bot deleted branch fix/issue-299 2026-04-06 18:09:04 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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#305
No description provided.