Fix projects list truncating due to admin API and top limit#1
Open
keith-at-wildeye wants to merge 2 commits intomainfrom
Open
Fix projects list truncating due to admin API and top limit#1keith-at-wildeye wants to merge 2 commits intomainfrom
keith-at-wildeye wants to merge 2 commits intomainfrom
Conversation
GetProjectsAsync used a hardcoded $top=100 which caused create and other commands to fail for projects beyond the 100th result. Increased to 500 to accommodate larger YouTrack instances. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The admin API only returns projects where the token has admin access, which may exclude valid projects. If a project short name is not found via the admin API, resolve its ID by searching for an existing issue in that project instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
yt create(and any command that resolves a project short name to an internal ID) was failing for projects not returned byGetProjectsAsync. Two issues:$top=100hardcoded — truncates results on larger YouTrack instances/api/admin/projects— only returns projects where the token has admin access, which can be a much smaller set than all accessible projectsFix
$topto 500/api/admin/projectsto/api/projectsso all projects accessible to the token are returned, not just admin onesNote
The non-admin
/api/projectsendpoint returns projects the authenticated user can see, which is the correct set for resolving project names when creating issues.