fix: fix: disinto release fails to load FORGE_OPS_REPO from project config (#180) #181

Merged
dev-qwen merged 1 commit from fix/issue-180 into main 2026-04-03 08:00:39 +00:00
Collaborator

Fixes #180

Changes

Fixes #180 ## Changes
dev-qwen added 1 commit 2026-04-03 07:44:00 +00:00
fix: fix: disinto release fails to load FORGE_OPS_REPO from project config (#180)
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
fcb4b1ec40
Collaborator

AI Review

Summary\n\nFixes the case where disinto release is invoked without PROJECT_NAME set in the environment, which previously caused the project TOML to be silently skipped — leaving FORGE_OPS_REPO unset and the PR creation at line 2978 failing.\n\n### Findings\n\n- info bin/disinto:2898: find ... | head -1 picks an arbitrary first match when multiple .toml files exist in projects/ (find ordering is inode/filesystem-dependent, not alphabetical). This is non-deterministic in theory, but disinto setups typically have exactly one project TOML, so this is not a real concern in practice. Worth noting in case multi-project setups ever arise.\n\n### Positives\n\n- local found_toml is correctly declared separately from the assignment — avoids masking the subshell exit code (ShellCheck-compliant).\n- Variables are properly quoted throughout.\n- 2>/dev/null on find gracefully handles a missing projects/ directory.\n- ! -name "*.example" correctly excludes example files.\n- The existing PROJECT_NAME-based path is preserved unchanged; the new path only activates when PROJECT_NAME is unset.

Verdict

APPROVE — Correct auto-detection fallback; properly structured bash with no security issues


Reviewed at fcb4b1e | AGENTS.md

## AI Review <!-- reviewed: fcb4b1ec4037cb61126fa99b53a55aa06cd33582 --> ### Summary\n\nFixes the case where `disinto release` is invoked without `PROJECT_NAME` set in the environment, which previously caused the project TOML to be silently skipped — leaving `FORGE_OPS_REPO` unset and the PR creation at line 2978 failing.\n\n### Findings\n\n- **info** `bin/disinto:2898`: `find ... | head -1` picks an arbitrary first match when multiple `.toml` files exist in `projects/` (find ordering is inode/filesystem-dependent, not alphabetical). This is non-deterministic in theory, but disinto setups typically have exactly one project TOML, so this is not a real concern in practice. Worth noting in case multi-project setups ever arise.\n\n### Positives\n\n- `local found_toml` is correctly declared separately from the assignment — avoids masking the subshell exit code (ShellCheck-compliant).\n- Variables are properly quoted throughout.\n- `2>/dev/null` on `find` gracefully handles a missing `projects/` directory.\n- `! -name "*.example"` correctly excludes example files.\n- The existing `PROJECT_NAME`-based path is preserved unchanged; the new path only activates when `PROJECT_NAME` is unset. ### Verdict **APPROVE** — Correct auto-detection fallback; properly structured bash with no security issues --- *Reviewed at `fcb4b1e` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-03 07:58:24 +00:00
Dismissed
review-bot left a comment
Collaborator

AI Review: APPROVE — Correct auto-detection fallback; properly structured bash with no security issues

AI Review: **APPROVE** — Correct auto-detection fallback; properly structured bash with no security issues
dev-qwen merged commit 7021f2a030 into main 2026-04-03 08:00:39 +00:00
dev-qwen deleted branch fix/issue-180 2026-04-03 08:00:40 +00:00
Collaborator

AI Review

Summary\n\nThe old code gated TOML loading on , so when was unset the condition was false and was never called — leaving empty and the subsequent PR-creation curl failing.\n\nThe fix correctly splits the two cases:\n- No PROJECT_NAME → scan (excluding ) and load the first match\n- PROJECT_NAME set → build the explicit path and load as before\n\n### Checklist\n\n- Logic: Correct. won't match even without the exclusion clause (since they don't end in ), but the extra guard is harmless.\n- Quoting: is properly double-quoted in the call.\n- ShellCheck: on its own line before the command-substitution assignment is correct practice for preserving the exit code — passes ShellCheck.\n- Edge case — multiple TOMLs: picks one non-deterministically if multiple project TOMLs exist. Acceptable for a single-project box (the common case); a multi-project setup should set explicitly.\n- No external actions introduced: change is local bash logic only.\n- Security: no new command injection surface; is already trusted.

Verdict

APPROVE — Correct fix: auto-detects project TOML when PROJECT_NAME is unset, restoring FORGE_OPS_REPO loading for the release subcommand


Reviewed at fcb4b1e | AGENTS.md

## AI Review <!-- reviewed: fcb4b1ec4037cb61126fa99b53a55aa06cd33582 --> ### Summary\n\nThe old code gated TOML loading on , so when was unset the condition was false and was never called — leaving empty and the subsequent PR-creation curl failing.\n\nThe fix correctly splits the two cases:\n- **No PROJECT_NAME** → scan (excluding ) and load the first match\n- **PROJECT_NAME set** → build the explicit path and load as before\n\n### Checklist\n\n- **Logic**: Correct. won't match even without the exclusion clause (since they don't end in ), but the extra guard is harmless.\n- **Quoting**: is properly double-quoted in the call.\n- **ShellCheck**: on its own line before the command-substitution assignment is correct practice for preserving the exit code — passes ShellCheck.\n- **Edge case — multiple TOMLs**: picks one non-deterministically if multiple project TOMLs exist. Acceptable for a single-project box (the common case); a multi-project setup should set explicitly.\n- **No external actions introduced**: change is local bash logic only.\n- **Security**: no new command injection surface; is already trusted. ### Verdict **APPROVE** — Correct fix: auto-detects project TOML when PROJECT_NAME is unset, restoring FORGE_OPS_REPO loading for the release subcommand --- *Reviewed at `fcb4b1e` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-03 09:47:07 +00:00
review-bot left a comment
Collaborator

AI Review: APPROVE — Correct fix: auto-detects project TOML when PROJECT_NAME is unset, restoring FORGE_OPS_REPO loading for the release subcommand

AI Review: **APPROVE** — Correct fix: auto-detects project TOML when PROJECT_NAME is unset, restoring FORGE_OPS_REPO loading for the release subcommand
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#181
No description provided.