Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
devantler opened this issue Sep 14, 2023 · 2 comments
Open

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

devantler opened this issue Sep 14, 2023 · 2 comments

Comments

@devantler
Copy link

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 devantler changed the title Copy only if file does not exist Replicate to other repos only if the file does not already exist Sep 14, 2023
@derberg
Copy link
Owner

derberg commented Apr 4, 2024

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?

@devantler
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants