derberg/manage-files-in-multiple-repositories

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

devantler opened this issue · 2 comments

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?

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?

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 :-)