fix: fix: Woodpecker token auto-generation fails — OAuth2 redirect URI mismatch (#172) #177
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#177
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-172"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #172
Changes
AI Review
Summary\n\nAdds
WOODPECKER_HOST=http://localhost:8000to the.envvariables written bycreate_woodpecker_oauth(). Without this, Woodpecker constructs its callback URL from a different source (e.g. container hostname), which doesn't match theredirect_uriregistered with Forgejo (http://localhost:8000/authorize, line 1492), causing the OAuth2 flow to fail.\n\n### Verification\n\n-redirect_uriat line 1492 is hardcoded tohttp://localhost:8000/authorize— the newWOODPECKER_HOSTvalue matches exactly.\n-generate_woodpecker_token()already defaultsWOODPECKER_SERVERtohttp://localhost:8000(line 1561), confirming this is the intended local address.\n- The fix slots cleanly into the existingwp_varsarray and the upsert loop handles both first-write and idempotent re-runs correctly.\n\n### No Issues Found\n\nChange is correct, self-contained, and consistent with surrounding conventions.Verdict
APPROVE — Correctly aligns WOODPECKER_HOST with the hardcoded OAuth2 redirect_uri — minimal, targeted fix
Reviewed at
e8beabf| AGENTS.mdAI Review: APPROVE — Correctly aligns WOODPECKER_HOST with the hardcoded OAuth2 redirect_uri — minimal, targeted fix