Skip to content
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 pulling from Gitlab (+ other alternative git repository service providers) #80

Closed
luzpaz opened this issue Jun 23, 2018 · 17 comments

Comments

@luzpaz
Copy link
Collaborator

luzpaz commented Jun 23, 2018

Per a recent discussion on the forum:.

Due to Microsoft buying GitHub it could happen potential future FreeCAD module developers won't join GitHub anymore. As easily as in the past. Therefore likely alternative git repository service provider support will be needed.

@TheRaytracers
Copy link

TheRaytracers commented Nov 19, 2020

I have not much knowledge about the way of working of the Addon Manager, but it looks like the GitPython library or zip files are used, right? If I understood right, this library isn't limited to GitHub, but serves nearly any git repository and the zip library of course too.
So I would ask what exactly is blocking GitLab support.

@yorikvanhavre
Copy link
Member

Nothing, gitlab or any others are also supported. Only detail, people without gitpython installed still rely on downloading and unpacking a zip file. This still use gihub urls iirc, it will require some changes probably

@TheRaytracers
Copy link

Nothing, gitlab or any others are also supported. Only detail, people without gitpython installed still rely on downloading and unpacking a zip file. This still use gihub urls iirc, it will require some changes probably

Ok, I looked through the code and if I see it right, the functions get_zip_url(), get_readme_url(), etc. in addonmanager_utilities.py has to be changed. Probably it is not possible to implement a solution for every git hosting service but support for GitLab would be a beginning.
The optimal solution of course would be to introduce something like a hoster object where the necessary informations are stored, but I think, we should do this later :)

Does anyone know a way to find out, where the repository is hosted?

@luzpaz
Copy link
Collaborator Author

luzpaz commented Nov 19, 2020

Lets remember also that this feature is fixed in the Extension Manager, IIRC.

@yorikvanhavre
Copy link
Member

maybe each addon could optionally provide a zip url in their metadata.txt?

@TheRaytracers
Copy link

Lets remember also that this feature is fixed in the Extension Manager, IIRC.

Hm, will it be part of the 0.19 release (in the daily version it isn't included so far)?
If not, I would vote for an simple solution like the metadata.txt.

maybe each addon could optionally provide a zip url in their metadata.txt?

Is the reading of the file already implemented? I ask, because I think, without GitPython it would be service depend again what the exact path is.

@yorikvanhavre
Copy link
Member

yorikvanhavre commented Dec 2, 2020

Is the reading of the file already implemented? I ask, because I think, without GitPython it would be service depend again what the exact path is.

Yes it is. It's just a matter of extending. I'll try to do that this week.

EDIT No need! Already implemented: https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/AddonManager/addonmanager_utilities.py#L251 Might not be too future-proof, though... We should find a way to get that more automatically

@luzpaz
Copy link
Collaborator Author

luzpaz commented Dec 2, 2020

Sort of off-topic but relevant: @yorikvanhavre what about starting to consider Extension Manager?

@TheRaytracers
Copy link

EDIT No need! Already implemented: https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/AddonManager/addonmanager_utilities.py#L251 Might not be too future-proof, though... We should find a way to get that more automatically

Unfortunately we already moved the repo to GitHub, but I think, I will survive this. Then we have the GitLab repo for developing and the GitHub repo for stable versions now :)

@yorikvanhavre
Copy link
Member

sorry it came late :/ in any case i'd like much to have more addons outside the github universe.. that would reforce all our system..
@luzpaz honestly i didn't test lately.. a priori why not, but the current one is a simple thing easy to maintain, while the other is much more complex and depends basically on one person... so that needs to be well assessed

oliveroxtoby pushed a commit to oliveroxtoby/FreeCAD-addons that referenced this issue Mar 24, 2021
@chennes
Copy link
Member

chennes commented Jan 1, 2022

We can for the most part now pull from GitLab (and also Debian Salsa). I have some further refinements to this in mind, but the core functionality is implemented.

@chennes chennes self-assigned this Jan 1, 2022
@luzpaz
Copy link
Collaborator Author

luzpaz commented Jan 30, 2022

@chennes how do we do this with the new changes to Addon Manager? (Or was this feature temporarily suspended?)

@chennes
Copy link
Member

chennes commented Jan 30, 2022

We support GitHub, Gitlab, Framagit, and salsa.debian.org -- in fact, if the Addon specified the URL to the README in its package.xml file, we support any public git repo at all, regardless of its location.

@luzpaz
Copy link
Collaborator Author

luzpaz commented Jan 31, 2022

Probably something we should specify in https://wiki.freecad.org/Package_Metadata

@chennes
Copy link
Member

chennes commented Jan 31, 2022

That's not really a "metadata" question (the documentation about the metadata is already pretty clear that you must specify the repo, and we highly recommend the README). I might tweak the page about the Addon Manager to spell that out, though, I need to work a lot on that page now.

@luzpaz
Copy link
Collaborator Author

luzpaz commented Jan 31, 2022

Happy to help with that. Let me know how I can!

@chennes
Copy link
Member

chennes commented Feb 13, 2022

I'm going to close this as the core issue at hand is resolved. If there are other git hosts that we want to add it's pretty straightforward (especially if they are just hosted Gitlab instances). Those should get their own feature requests.

@chennes chennes closed this as completed Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants