-
-
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
[OSSLifecycle OSSLifecycleRedirect] Add file_url param to pull from non-github sources #10489
[OSSLifecycle OSSLifecycleRedirect] Add file_url param to pull from non-github sources #10489
Conversation
Add file_url param to allow pulling from non-github sources
Add test using file_url variant of OSS Lifecycle badge using Netflix OSSTracker repo
|
I think the way I'd prefer to do this would be to make the badge route
(i.e: completely get rid of Then we implement the legacy compatibility with redirectors that catch
Really the key thing is using the |
Remove all references and code for the old /{user}/{repo} and /{user}/{repo}/{branch} functionality. This will be replaced by a redirect service. Also updated all tests to use the new file_url method
add a redirector for the original osslifecycle pattern
I didn't realise there was a redirector method, makes sense to do it that way. I have stripped back the |
🚀 Updated review app: https://pr-10489-badges-shields.fly.dev |
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.
Thanks. Couple of minor changes then this is good to merge
Tweak the Description to remove reference to GitHub as now works with any repository, and updated handle function to remove reference to unused variables.
This PR addresses #10244 (OSS Lifecycle GitLab) by adding a queryParam of
file_url
. When this parameter is provided, we fetch the provided URL instead of defaulting to the GitHub RAW Content URL. Existing badges using the{user}/{repo}
and{user}/{repo}/{branch}
pattern are maintained, however providingfile_url
with these will still override the URL we fetch.UI Changes:
OSS Lifecycle (file)
OpenAPI entry for the new end point without path parametersOSS Lifecycle
toOSS Lifecycle (GitHub)
OSS Lifecycle (branch)
toOSS Lifecycle (GitHub branch)
Changes to tests:
file_url
against the Netflix OSS Tracker RepoOne potential improvement would be to rename the service class, currently it is
OssTracker
however everywhere else is referred to asosslifecycle
.