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

[MAINTENANCE] Change path and remove branch name in .gitmodules #2959

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

jacquesfize
Copy link
Contributor

@jacquesfize jacquesfize commented Mar 13, 2024

In the .gitmodules file, url given for each submodule can be indicated using relative URL to the parent (here GeoNature git url). It allows to clone both GeoNature and its submodule using the same method (HTTPS or SSH).

@jacquesfize jacquesfize added this to the 2.14.1 milestone Mar 13, 2024
@jacquesfize jacquesfize changed the title Change path in .gitmodule + remove branch id Change path in .gitmodule + remove branch name Mar 13, 2024
@jacquesfize jacquesfize changed the title Change path in .gitmodule + remove branch name [MAINTENANCE] Change path in .gitmodules + remove branch name Mar 13, 2024
@jacquesfize jacquesfize changed the title [MAINTENANCE] Change path in .gitmodules + remove branch name [MAINTENANCE] Change path and remove branch name in .gitmodules Mar 13, 2024
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.44%. Comparing base (45fec53) to head (9e09357).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2959   +/-   ##
========================================
  Coverage    78.44%   78.44%           
========================================
  Files           89       89           
  Lines         7199     7199           
========================================
  Hits          5647     5647           
  Misses        1552     1552           
Flag Coverage Δ
pytest 78.44% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jacquesfize jacquesfize marked this pull request as ready for review March 13, 2024 15:09
@VincentCauchois
Copy link
Member

VincentCauchois commented Mar 13, 2024


Avis personnel

Il me semble cohérent que les URL des submodules soient systématiquement définies avec le même protocole : HTTPS, SSH Git... ; que pour les URL du remote du dépôt parent. Par exemple, si on fait pointer son dépôt GeoNature local vers un remote d'URL git@github.com:PnX-SI/GeoNature.git, avec protocole SSH Git donc, tous les submodules définies dans le fichier ".gitmodules" avec des URL relatives seraient initialisés avec des URL avec protocole SSH Git également. De même pour un remote d'URL https://github.com/PnX-SI/GeoNature.git, avec protocole HTTPS.


Reste à faire

Si validé, faire de même pour les autres dépôts : TaxHub, UsersHub, gn_module_import, gn_module_export...


Informations

Pour gn_module_export l'URL pour le submodule GeoNature avait été mise à jour en HTTPS avec cette PR : PnX-SI/gn_module_export#203

Pour gn_module_monitoring voir la PR suivante pour mise à jour de l'URL pour le submodule GeoNature en HTTPS : PnX-SI/gn_module_monitoring#294

Il me semble qu'il y avait également une PR ou une issue pour permettre de configurer l'utilisation du protocole HTTPS ou bien du protocole SSH Git dès l'installation d'une instance GeoNature, mais je n'en retrouve plus la trace.

Copy link
Member

@VincentCauchois VincentCauchois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testé pour les 2 protocoles HTTPS ; https://github.com/PnX-SI/GeoNature.git ; et SSH ; git@github.com:PnX-SI/GeoNature.git ; et approuvé.

Tests effectués :

git clone -b feat/gitmodule_relative_path --single-branch https://github.com/PnX-SI/GeoNature.git` geonature_git_https

cd geonature_git_https

git submodule init 

git submodule update

cd backend/dependencies/RefGeo

git remote -v
git clone -b feat/gitmodule_relative_path --single-branch git@github.com:PnX-SI/GeoNature.git geonature_git_ssh` 

cd geonature_git_ssh

git submodule init 

git submodule update

cd backend/dependencies/RefGeo

git remote -v

@jacquesfize jacquesfize merged commit a62750d into develop Mar 14, 2024
9 checks passed
@jacquesfize jacquesfize deleted the feat/gitmodule_relative_path branch March 14, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants