woodpecker-ci / woodpecker-ci/plugin-git
[Feature] Support `submodule_override` for nested submodules
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Go
- Stars
- 25
- Forks
- 40
- Avg merge
- 22h 23m
- Merged PRs (30d)
- 6
Description
Would be suuper cool to support nested submodule path overrides
clone:
git:
image: woodpeckerci/plugin-git
settings:
recursive: true
submodule_override:
first_submodule_path: <url for first_submodule_path>
# The following does not apply when git recurses into first_submodule_path
first_submodule_path/other_dir/nested_submodule: <url for nested_submodule>
I am trying to override the github url of my submodules to a local git server
Example output:
+ git submodule update --init --recursive
Cloning into '/woodpecker/src/{woodpecker_url}/{main_repo_path}'...
Submodule path '{first_submodule}': checked out 'f5a8687e04965c597e534f9afe2935aedd1a4753'
Cloning into '/woodpecker/src/{woodpecker_url}/{main_repo_path}/other_dir/nested_submodule'...
fatal: could not read Username for 'https://github.com': No such device or address
fatal: clone of '{{nested_module_url}}' into submodule path '/woodpecker/src/{woodpecker_url}/{main_repo_path}/other_dir/nested_submodule' failed
Failed to clone 'other_dir/nested_submodule'. Retry scheduled
Cloning into '/woodpecker/src/{woodpecker_url}/{main_repo_path}/other_dir/nested_submodule'...
fatal: could not read Username for 'https://github.com': No such device or address
fatal: clone of '{{nested_module_url}}' into submodule path '/woodpecker/src/{woodpecker_url}/{main_repo_path}/other_dir/nested_submodule' failed
Failed to clone 'other_dir/nested_submodule' a second time, aborting
fatal: Failed to recurse into submodule path '{first_submodule}'
exit status 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the plugin handles clone.git.settings.recursive and submodule_override, then reproduce the nested-submodule example from the issue. Done means a nested path such as first_submodule_path/other_dir/nested_submodule uses its configured local URL during recursive cloning instead of the original GitHub URL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, go
- Domain
- ci-cd, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100