Checkout parent repository when submodule depends on it.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8.9k
- Forks
- 2.8k
- PR merge metrics
- No merged PRs in 30d
Description
Currently one has to do this within a subproject in order to build it if the subproject requires files from the parent project to be cloned first
https://github.com/Elskom/zlib.managed/blob/main/.github/workflows/dotnetcore-build.yml#L15-L24
However doing this (since it's .NET Core) if the project uses source link, it would result in various warnings when building saying it cannot read the .git directories of the clones.
A cleaner aproach to this I would prefer more than this would be a simple actions/checkout@v2 step that then sets
parent: 'Elskom/Sdk'
So then the checkout action would look at it (default to that is null), and if it's not null or empty, check it out first, then check out the other repository like normally.
Something would need to be done on this action to somehow fix sourcelink's complaining though.
Bonus Points: Do not emit this to <subproject repo name><subproject repo name>/<parent project repo name> and instead of <parent project repo name>/<parent project repo name> at least.
The reason why as to this is an issue as it wastes valuable build time doing them separate and then it tries to clear out the specific directories that are being cloned too.
Alternatively, in this case the action could recursively clone the parent, then check out the commit to the subproject like normally and avoid the clear out on it in terms of the files, however it would mean also adding a variable to tell the action where the submodule is located at in said project so it can check out the commit of that specific project.
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 with the linked Elskom/zlib.managed workflow, especially .github/workflows/dotnetcore-build.yml lines 15-24, and review how actions/checkout@v2 currently handles repositories. Define how a parent repository option, repository paths, subproject commits, and Source Link warnings should behave; done requires a tested checkout flow that avoids unnecessary cloning and path cleanup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- ci-cd, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100