-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add OpenVSX detector #4243
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: main
Are you sure you want to change the base?
Add OpenVSX detector #4243
Conversation
} | ||
|
||
s1 := detectors.Result{ | ||
DetectorType: detectorspb.DetectorType_Generic, // Using Generic since VSX is not explicitly listed |
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.
We can create a new detector type. Please refer to this: Adding a New Detector
@Kiblyn11 Thanks for your contribution! I’ve done an initial review; great work so far. I’ve left some feedback for minor improvements. I’ll do a thorough review once the updates are in. |
@shahzadhaider1 Thanks for your initial review. I have to admit I hacked this at first to check some assumptions without looking at contributing guides. I updated the detector type to be specific. |
return []string{ | ||
"VSX", "VSIX", "OPENVSX", | ||
"EXTENSION", "PUBLISHER", | ||
"ovsx", "OVSX_TOKEN", "OVSX_ACCESS_TOKEN", | ||
"OVSX_PAT", "OVSX_KEY", | ||
} |
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.
VSX
is a substring in OPENVSX
, OVSX
, etc. so strings containing it are not required. Keywords are case-insensitive as well.
Description:
Add a detector for OpenVSX tokens used by OpenVSX registry: https://open-vsx.org/
It use an available API endpoint on a legitimate namespace and look for permission issue error which means the token exist and is valid.
Checklist:
make test-community
)?make lint
this requires golangci-lint)?