-
-
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
Support [F-Droid] custom repos #10792
base: master
Are you sure you want to change the base?
Conversation
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.
Hey, thank you for the PR.
Here are some early review points.
serverFqdn: Joi.string().hostname(), | ||
endpoint: Joi.string(), |
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.
shouldn't we merge these two into one input? just endpoint, there is no need to split here.
Also i think Joi.string()
is too loose for part of a url and could intrudoce invalid input that passes this test.
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.
I would rather keep it separate, as they are different components in the URL.
If we would combine them, how would you call it to not confuse the user?
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.
You're right about the endpoint format. What about "relativeUri" from validators.js?
It seems other services use the same validator for paths.
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.
In other services we use something like gitea_url
or gitlab_url
i propose using something similar.
notice that in some tests the base url can even include get params.
also you can use the optionalUrl
for the schema.
we could keep the project consistency and use fdroid_url
here
i recommend you to take a look at one of the services already using hosted instances like gitea
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.
Passing the full URL does not feel right.
Especially with #2637 in mind, at least the protocol should be hard-coded to https.
The way Matrix (https://shields.io/badges/matrix) badges do it seems much better and "cleaner" for the user.
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.
Thank you for highlighting #2637. It seems like a valuable addition that could be implemented as a project-wide feature. While you can explore this idea in the current PR, I believe it would be better to separate these two subjects and ensure each PR focuses on a single topic for clarity and maintainability.
As a temporary solution, you could consider introducing a new validator, optionalUrlHttps
, in validators.js
. This would address the immediate need without over complicating this PR.
Regarding the Matrix badges, it uses only the FQDN
for the host/endpoint
. The mode parameter, however, serves a distinct purpose—it separates result types and facilitates different goals beyond accessing the endpoint. The key takeaway here is that mode provides functionality tied to achieving separate objectives.
Could you provide an example where your proposed endpoint
achieves a distinct goal separate from simply accessing the same information? For comparison, consider how the Matrix badge's separation of FQDN
and mode addresses two clearly different goals.
Closes #9649