Skip to content

fix(import): list every team project when selecting an import project - #1291

Open
RaphaelFakhri wants to merge 1 commit into
linear:masterfrom
RaphaelFakhri:fix/import-paginate-team-projects
Open

RaphaelFakhri wants to merge 1 commit into
linear:masterfrom
RaphaelFakhri:fix/import-paginate-team-projects

Conversation

@RaphaelFakhri

Copy link
Copy Markdown
Contributor

Summary

Fix linear-import --project reporting "Project not found" for projects beyond the first page of results.

importIssues read team projects with a single team.projects() call, which returns 50 projects by default. For teams with more projects, the --project flag and the interactive project prompts could not see the rest. Teams, users and labels already use paginate; this change does the same for projects through a small fetchTeamProjects helper used in all three places.

Testing

The new test runs importIssues against a stubbed API where the requested project is on the second page of team projects, and checks that the issue is created in that project.

pnpm --filter @linear/import exec vitest run src/_tests/importIssues.test.ts
  • Before the fix: 1 failed (process.exit(1) after the project is not found).
  • After the fix: 1 passed.

The full @linear/import test run passes, and a changeset is included.

The --project flag and the project prompts read only the first page of
team projects, so projects beyond the first 50 were reported as not found.
Paginate through all projects.
@changeset-bot

changeset-bot Bot commented Sep 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 725d326

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@linear/import Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant