-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
ref: Use getApiURl() inside of static/app/components/*
#106897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
The getAttachmentUrl refactor changed how download parameters are handled:
- OLD: URL hardcoded ?download in the string
- NEW: URL is clean, download added via query: {download: true}
When useApiQuery processes {query: {download: true}}, it serializes to
?download=true, not ?download. Tests need to use matchQuery to properly
match query parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| owner: integratedOrgId!, | ||
| }, | ||
| } | ||
| ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mismatched query key format breaks cache invalidation
Medium Severity
The query key in useInfiniteRepositories.tsx now uses getApiUrl() which URL-encodes path parameters, but the corresponding invalidateQueries call in useSyncRepos.tsx still uses string interpolation without encoding. If organization.slug or integratedOrgId contain special characters (spaces, slashes, etc.), the query key and invalidation key won't match, causing the cache invalidation to silently fail after repository sync completes.


See: https://gist.github.com/ryan953/af5458fa4f89ae42cc19e8ea266b7e9a