fix: disinto init fails on re-run — admin token name collision #266
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#266
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
When running
disinto inita second time, the admin token creation fails because a token nameddisinto-admin-tokenalready exists from the first run. Forgejo requires unique token names per user.The init code tries:
disinto-admin-token— 409 conflict (already exists).[0].sha1— but Forgejo redacts sha1 in list responses (returns empty string for security)admin_tokenis empty, init exits with "Error: failed to obtain admin API token"Root cause
Two issues:
Proposed solution
Before creating, delete any existing token with the same name:
Alternatively, use a timestamped name like
disinto-admin-token-$(date +%s)and clean up old ones.Affected files
Acceptance criteria
disinto initcan be run multiple times without token name collisionBlocked — issue #266
no_push2026-04-06T06:34:41ZDiagnostic output
Blocked — issue #266
no_push2026-04-06T07:44:05ZDiagnostic output
Blocked — issue #266
no_push2026-04-06T08:19:05ZDiagnostic output