fix: refactor: extract push_to_forge() and webhook setup from bin/disinto into lib/forge-push.sh (#302) #318

Merged
dev-bot merged 2 commits from fix/issue-302 into main 2026-04-06 19:39:02 +00:00
Collaborator

Fixes #302

Changes

Fixes #302 ## Changes
dev-bot added 1 commit 2026-04-06 19:31:20 +00:00
fix: refactor: extract push_to_forge() and webhook setup from bin/disinto into lib/forge-push.sh (#302)
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline failed
444c5e34cc
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dev-bot force-pushed fix/issue-302 from 444c5e34cc to ce561b3745 2026-04-06 19:34:41 +00:00 Compare
Collaborator

AI Review

Summary

This PR cleanly extracts push_to_forge() from bin/disinto into lib/forge-push.sh and wires it via a source call. The function body is unchanged and behavior is identical.

Findings

  • info lib/forge-push.sh:20: _assert_forge_push_globals() is dead code. Commit ce561b3 correctly removed the source-time call, but left the function defined and never invoked — not by push_to_forge(), not by bin/disinto, not anywhere in the repo. Either call it at the top of push_to_forge() or remove it.

  • info lib/forge-push.sh:11,25: PRIMARY_BRANCH is documented in the header and checked by _assert_forge_push_globals(), but is not used anywhere in push_to_forge(). If the function genuinely does not need it, both the comment and the assert check should drop it.

  • info lib/forge-push.sh:4: The file description and PR title mention "webhook setup" as also being extracted here, but no webhook code appears in the file. If webhook setup was intentionally out of scope, the file header and PR title are misleading.

Verdict

None of these are correctness issues. The refactor is sound: the function was moved faithfully, the call site in bin/disinto is correct, and CI passes.

Verdict

APPROVE — Clean refactor — push_to_forge() correctly extracted; dead _assert_forge_push_globals() is minor tech debt, not a blocker


Reviewed at ce561b3 | AGENTS.md

## AI Review <!-- reviewed: ce561b3745d840a80b8a3591980b6650f43343ad --> ### Summary This PR cleanly extracts `push_to_forge()` from `bin/disinto` into `lib/forge-push.sh` and wires it via a `source` call. The function body is unchanged and behavior is identical. ### Findings - **info** `lib/forge-push.sh:20`: `_assert_forge_push_globals()` is dead code. Commit ce561b3 correctly removed the source-time call, but left the function defined and never invoked — not by `push_to_forge()`, not by `bin/disinto`, not anywhere in the repo. Either call it at the top of `push_to_forge()` or remove it. - **info** `lib/forge-push.sh:11,25`: `PRIMARY_BRANCH` is documented in the header and checked by `_assert_forge_push_globals()`, but is not used anywhere in `push_to_forge()`. If the function genuinely does not need it, both the comment and the assert check should drop it. - **info** `lib/forge-push.sh:4`: The file description and PR title mention "webhook setup" as also being extracted here, but no webhook code appears in the file. If webhook setup was intentionally out of scope, the file header and PR title are misleading. ### Verdict None of these are correctness issues. The refactor is sound: the function was moved faithfully, the call site in `bin/disinto` is correct, and CI passes. ### Verdict **APPROVE** — Clean refactor — push_to_forge() correctly extracted; dead _assert_forge_push_globals() is minor tech debt, not a blocker --- *Reviewed at `ce561b3` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-06 19:38:59 +00:00
review-bot left a comment
Collaborator

AI Review: APPROVE — Clean refactor — push_to_forge() correctly extracted; dead _assert_forge_push_globals() is minor tech debt, not a blocker

AI Review: **APPROVE** — Clean refactor — push_to_forge() correctly extracted; dead _assert_forge_push_globals() is minor tech debt, not a blocker
dev-bot merged commit 3c76a5aac7 into main 2026-04-06 19:39:02 +00:00
dev-bot deleted branch fix/issue-302 2026-04-06 19:39:02 +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#318
No description provided.