Skip to content

Comments

Add git protocol variables for controlling how theme repos are cloned#61

Merged
comzeradd merged 1 commit intomainfrom
git-repos
Dec 2, 2025
Merged

Add git protocol variables for controlling how theme repos are cloned#61
comzeradd merged 1 commit intomainfrom
git-repos

Conversation

@comzeradd
Copy link
Member

@comzeradd comzeradd commented Dec 1, 2025

Summary

To make it easy for switching git protocolo when hacing access to the theme repositories.

  • NRO_GIT_PROTOCOL: for child themes. Set to ssh by default, as this is the most common scanario.
  • GIT_PROTOCOL: for main theme. Set to https by default, as the most common scenario.

Both variables are set in .wp-env.override.json.

Testing

  • On a fresh develop clone, adjust on .wp-env.overrride.json.dist those two above variables or test with their default values.
  • On first env:install the .wp-env.override.json.dist file is copied over as .wp-env.override.json. So for repeating the test, you can either delete the last file, edit the dist file and re-run env:install or just edit .wp-env.override.json directly.
  • Run env:install and env:install <nro> with different variations of those two variables, to test that the themes are cloned using the protocol selected by those two variables.
  • Verify repo url by running git remote -v from within the theme.

@comzeradd comzeradd self-assigned this Dec 1, 2025
To make it easy for switching git protocolo when hacing access to the theme repositories.

- `NRO_GIT_PROTOCOL`: for child themes. Set to `ssh` by default, as this is the most common scanario.
- `GIT_PROTOCOL`: for main theme. Set to `https` by default, as the most common scenario.

Both variables are set in `.wp-env.override.json`.
@comzeradd comzeradd marked this pull request as ready for review December 1, 2025 13:17
Copy link
Contributor

@mardelnet mardelnet left a comment

Choose a reason for hiding this comment

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

@comzeradd, the testing instructions are not totally clear to me, for example:

  • On a fresh develop clone, adjust .wp-env.overrride.json accordingly.
    • Can you specify how it should be adjusted?
  • Run env:install and env:install <nro> with different settings.
    • What are those different settings?

@comzeradd
Copy link
Member Author

@comzeradd, the testing instructions are not totally clear to me

I enriched the testing instructions to make them more clear 👍🏻

@mardelnet
Copy link
Contributor

@comzeradd, the testing instructions are not totally clear to me

I enriched the testing instructions to make them more clear 👍🏻

Just to be clear, "On a fresh develop clone, adjust on .wp-env.overrride.json.dist those two above variables or test with their default values." means to edit NRO_GIT_PROTOCOL and GIT_PROTOCOL to use ssh or https and try all the possible combinations?

@comzeradd
Copy link
Member Author

Just to be clear, "On a fresh develop clone, adjust on .wp-env.overrride.json.dist those two above variables or test with their default values." means to edit NRO_GIT_PROTOCOL and GIT_PROTOCOL to use ssh or https and try all the possible combinations?

Yes, exactly. Probably not needed to test all possible combinations, as the one variable doesn't affect the other.

Copy link
Contributor

@mardelnet mardelnet left a comment

Choose a reason for hiding this comment

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

@comzeradd
Your code changes look good to me.
I also performed the following tests, and in all cases the website was correctly installed locally:

Test 1:

  • Environment: env:install
  • NRO_GIT_PROTOCOL : ssh
  • GIT_PROTOCOL : https

Test 2:

  • Environment: env:install
  • NRO_GIT_PROTOCOL : ssh
  • GIT_PROTOCOL : ssh

Test 3:

  • Environment: env:install chile
  • NRO_GIT_PROTOCOL : https
  • GIT_PROTOCOL : ssh

Test 4:

  • Environment: env:install colombia
  • NRO_GIT_PROTOCOL : https
  • GIT_PROTOCOL : https

@comzeradd comzeradd merged commit da4e163 into main Dec 2, 2025
5 checks passed
@comzeradd comzeradd deleted the git-repos branch December 2, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants