CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

fix(import): bulk import falls back to user accounts when the name is not an org #3526

Merged⚡ AI-generatedXSccantynz wants to mergefix/import-bulk-user-accountsmainopened 25d ago
ccantynzcommented 25d ago

/import/bulk only queried /orgs/{name}/repos, so importing the owner's own GitHub account (ccantynz-alt — a user, not an org) failed with "Organization not found (404)".

Now, on an org 404:

  • If the name is the token's own login → page /user/repos?affiliation=owner (the only listing that includes private repos).
  • Otherwise → page /users/{name}/repos (their public repos).
  • Still 404 → clear "neither an organization nor a user" error.

Same pagination, size-cap, and MAX_REPOS bounds apply on every path; the shared paginate helper keeps the error taxonomy (401/403/404) identical. bun test src/__tests__/import-bulk.test.ts passes (6/6), tsc clean.

🤖 Generated with Claude Code

gluecron[bot]🤖 botAI Reviewcommented 25d ago

AI review unavailable

The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.

ccantynzAI Reviewcommented 25d ago

AI Triage

(no summary)

Priority: medium Risk area: mixed

Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)

Suggestions only — nothing has been applied. The PR author stays in control.

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts