manage-files-in-multiple-repositories icon indicating copy to clipboard operation
manage-files-in-multiple-repositories copied to clipboard

Replicate to other repos only if the file does not already exist

Open devantler opened this issue 2 years ago • 2 comments
trafficstars

I have a use case where I want to copy out a default dependabot.yaml file to all my repos, but only if it doesn't already exist. This allows each repo to extend or overwrite the base but simultaneously ensures that all new repos have a minimal dependabot setup configured.

I was not able to find a possibility for this, so I would like to hear if this is something you find useful?

devantler avatar Sep 14 '23 20:09 devantler

yeah, kinda makes sense

I just for now use repos to ignore flag, so then copying contributor guide, I do it to all repos with some exceptions

any suggestions how the flag should be called?

derberg avatar Apr 04 '24 13:04 derberg

I was thinking of something in line with a boolean called ignoreExistingFiles. If it is set to true the action will not copy a file that exists, and if not it will have its default behavior :-)

I don't know if this is granular enough, otherwise, it could be a string list called existingFilesToIgnore with file paths to ignore. If an existing file path exists in the target repo it will be ignored. This gives more control to the user at the cost of some complexity.

Either approach would work for me, but I hope it helps :-)

devantler avatar Apr 04 '24 14:04 devantler