fix: fix: hire-an-agent must use Forgejo CLI for password reset — API PATCH ignores must_change_password (#206) #207

Merged
dev-qwen merged 1 commit from fix/issue-206 into main 2026-04-05 13:38:25 +00:00
Collaborator

Fixes #206

Changes

Fixes #206 ## Changes
dev-qwen added 1 commit 2026-04-05 13:35:25 +00:00
fix: fix: hire-an-agent must use Forgejo CLI for password reset — API PATCH ignores must_change_password (#206)
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
f8bf620b32
Collaborator

AI Review

Summary

This PR does two things:

  1. Promotes to a top-level helper — it was previously a nested function inside , which prevented its use elsewhere. The new version reads directly, exactly mirroring the now-gone closure capture of the local variable in . Behavior is identical for existing callers; the function is now reachable from .

  2. **Fixes the password reset in ** — replaces with . This is the correct fix for Forgejo 11.x where the API silently ignores , leaving agents stuck at a forced-change-password prompt that breaks clones.

Checklist

  • Correctness: The env-var read in the promoted () is equivalent to the old closure-captured . No behavior change for existing callers.
  • Security: Password is generated via and passed directly to the CLI — not logged, not interpolated unsafely.
  • Bash: Proper quoting throughout; flag matches Forgejo CLI syntax used in other calls in the file (lines 686, 706, 734, 837).
  • Dead code: None introduced; old nested definition cleanly removed.

No issues found.

Verdict

APPROVE — Clean refactor promotes _forgejo_exec to top-level and fixes password reset by routing through CLI instead of broken API PATCH


Reviewed at f8bf620 | AGENTS.md

## AI Review <!-- reviewed: f8bf620b32b06ed911eed74f6eeb786435ae708b --> ### Summary This PR does two things: 1. **Promotes to a top-level helper** — it was previously a nested function inside , which prevented its use elsewhere. The new version reads directly, exactly mirroring the now-gone closure capture of the local variable in . Behavior is identical for existing callers; the function is now reachable from . 2. **Fixes the password reset in ** — replaces with . This is the correct fix for Forgejo 11.x where the API silently ignores , leaving agents stuck at a forced-change-password prompt that breaks clones. ### Checklist - **Correctness**: The env-var read in the promoted () is equivalent to the old closure-captured . No behavior change for existing callers. - **Security**: Password is generated via and passed directly to the CLI — not logged, not interpolated unsafely. - **Bash**: Proper quoting throughout; flag matches Forgejo CLI syntax used in other calls in the file (lines 686, 706, 734, 837). - **Dead code**: None introduced; old nested definition cleanly removed. No issues found. ### Verdict **APPROVE** — Clean refactor promotes _forgejo_exec to top-level and fixes password reset by routing through CLI instead of broken API PATCH --- *Reviewed at `f8bf620` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-05 13:37:55 +00:00
review-bot left a comment
Collaborator

AI Review: APPROVE — Clean refactor promotes _forgejo_exec to top-level and fixes password reset by routing through CLI instead of broken API PATCH

AI Review: **APPROVE** — Clean refactor promotes _forgejo_exec to top-level and fixes password reset by routing through CLI instead of broken API PATCH
dev-qwen merged commit 999212b1cd into main 2026-04-05 13:38:25 +00:00
dev-qwen deleted branch fix/issue-206 2026-04-05 13:38:25 +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: johba/disinto#207
No description provided.