-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Jetbrains Badge uses old deprecated API that only supports IDEA plugins #5946
Comments
The new API can be used to retrieve total downloads as well as the current version. |
Thanks for the report @frimtec and providing the additional info on the new endpoint! By any chance do you know when JetBrains may be planning to drop the old API that we're currently using? We'd certainly like to make to switch since the new API supports additional plugin types, but would be good to know when the old one will be shutdown as well. |
@chris48s - My inclination was to label this as a service badge improvement since IIUC we're really just updating the service classes to leverage a new API. Not that the bug v. service badge labels matter all that much but wanted to get your thoughts since the bug label was added |
@calebcartwright - I guess there is no shutdown date defined yet.
|
If you are a user who doesn't know about the implementation details, here's what you see:
That looks like a bug to me, but you could frame "support more jetbrains plugin IDs" as a feature request if you prefer. I agree it is somewhat ambiguous. Labels aside, my initial assumption was that we could fix this in place and just drop in the new API as a replacement for the old one but looking into it a bit further, it looks like the newer API isn't quite compatible with the old one. If we've got a numeric plugin ID, all is well: but with the old API, it was possible to call something like It looks like in order to switch to the new API we would need to break some existing badges that use the https://img.shields.io/jetbrains/plugin/v/org.intellij.scala format, unless there is another query/endpoint we can use? Maybe that is unavoidable if the old API will be removed at some point. Are there any docs for this API? The only ones I can find tell you to use the "old" one: https://plugins.jetbrains.com/docs/marketplace/plugin-details.html |
Ah, that's the important distinction. I was (incorrectly) under the impression that the TeamCity plugins were a new thing. Bit surprised this hasn't come up before
We could add a new route for the TeamCity plugins, at least as a tactical option to enable support for those without breaking existing badges, and add redirectors as necessary down the road |
The old API worked for Intellij-IDEA plugins only. The new API supports all plugins on the "Jetbrains Marketplace". To not break old badges, would it be an idea to create a new "badge-type" for jetbrains-marketplace, supporting all existing plugins and keep the old one unchanged (restricted for intellij-Idea plugins as of now - at least as long as the old API is operational)? I have not found a documentation either for the new API, but Jetbrains just created a ticket to document, that the old API is deprecated (:link: https://youtrack.jetbrains.com/issue/MP-3342). |
I think the approach we should take is:
|
Many thanks for the fix :-) |
Are you experiencing an issue with...
🪲 Description
The implementation to generate Jetbrains badges (https://github.com/badges/shields/blob/master/services/jetbrains/jetbrains-base.js) usees an old deprecated API that only works for IDEA plugins but not for other jetbrains plugins (e.g. TeamCity).
See also Ticket at Jetbrains YouTrack: https://youtrack.jetbrains.com/issue/MP-3341
The new API is
https://plugins.jetbrains.com/api/plugins/<PLUGIN-ID>
and supports all plugins in the Jetbrains marketplace.Works - as long as the deprecated API is operationl (IDEA-Plugin):
🔗 https://img.shields.io/jetbrains/plugin/v/15308-import-control
Does not work (TeamCity-Plugin):
🔗 https://img.shields.io/jetbrains/plugin/v/12382-inspection-violation-notification
The text was updated successfully, but these errors were encountered: