-
Notifications
You must be signed in to change notification settings - Fork 10
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
Incorrect URLs for non-GitHub repositories #48
Comments
I do have a fix for the issue, though I don't have permissions to add the corresponding commit with the pull request in this repository. |
You can post it here. I'll issue an update this weekend. Thank you |
In
And then, added the case in the URL property within the
P.D: I'm not sure if all URLs will have only one |
This will brake github urls, as they always include an underscore separating the username from the project name. I'll think of some other solution, though. |
Maybe a solution could be to check if the prefix has “.com”, “.net”, or other common internet domains? Like a url checker. |
This is exactly what I am doing now, but there are a few border cases to deal with |
Here is how git url is transformed into project id (bb, gl, and dr are just hostnames for ssh as indicated):
In words: two first / are replaced by _, if there is only one, it is also replaced by _
some examples:
A list of prefixes update in Version T, U, S, Q:
|
I was trying to create a url checker. A possibility could be to use a regex such as In code, with just the regex, it would be...
I'm not sure if the other cases for sourceforge and the repositories in
|
Yes, prefix array is superfluous and, furthermore, needs to be changed with each new forge added. |
Is there any way I can further help with this issue? |
Many thanks: would you mind submitting a fix via PR to get the right author for the fix? |
I believe I have no rights to commit in the repository. |
@sivanahamer This issue is not that hard to fix, but for the time it is blocked by another change. Apparently there was a fairly recent change in relations, they started to use deduplicated project URL (capital P vs lowercase p). I need to update several more bits of code to make it work, and was holding only because of that. Unfortunately, I only have a few hours per week to this project - but I'll try to finish it this weekend. |
@user2589 There is also a and A for authors/aliased authors. Just to be clear, the lowercase (not aliased) versions are not going away, however. I am not sure how you plan to handle it, but it may be simplest to have a separate class for project and author for aliased versions (as a completely different object) as combining both in a single class may add complications. |
I encountered a case where the repository's owner name contains an underscore. For example: https://gitlab.com/rki_bioinformatics/DeePaC is represented as gitlab.com_rki_bioinformatics_DeePaC. |
Great point. a) Indeed, the following instances of user/org names on github contain underscore, these need to be added as exceptions to the url translator.
b) Renaming non-gh repos to an actual url may be a reasonable approach to deal with url translation for the remaining forges. This can be a task for an upcoming version V. |
Hello!
There is an issue with generating the URL for some non-GitHub repositories.
For example, the project with URI
gitlab.freedesktop.org_libinput_libinput
. The following code...Produces the following output...
However, the project URL is
https://gitlab.freedesktop.org/libinput/libinput
.This error can happen to any project that is not hosted in the list of projects in
URL_PREFIXES
. Updating the list of projects with those within the list seems unmanageable, as the are many non-GitHub repositories in WoC.The text was updated successfully, but these errors were encountered: