Open miran-hadz opened 1 year ago
Hey man, glad you like it, v2 was just released and I renamed repo as it no longer only copies files, it can also remove files.
are regex patterns supported under patterns_to_ignore, patterns_to_remove (neew PR you've created) and similar..?
I'm using JS includes
function there, so kinda regex. So when you specify ./github/workflows
then all files from that dir will be ignored
Is there a way to provide support for repo_name as an env or similar (to be used with push trigger event)
not sure if we can figure out from PAT what repos you have access to. Isn't topics_to_include
useful for you, so you can add topic to repo and then update only repos that have that topic?
Also, if you like this project, please leave a star β as maybe once it gets too popular, then GitHub will support it natively π
I'm using JS
includes
function there, so kinda regex. So when you specify./github/workflows
then all files from that dir will be ignored
I was more referring to patterns in file names, e.g. ignoring file names "mod.main.bicep" in all folders
not sure if we can figure out from PAT what repos you have access to. Isn't
topics_to_include
useful for you, so you can add topic to repo and then update only repos that have that topic?
How do you figure out the repos then? Do you use all inside organization or? I guess I could use topics but then the danger is someone might use the same topic in a different repo and get access to files they shouldn't otherwise have. Is there a reason why specificing a list of repos is not supported through code?
I was more referring to patterns in file names, e.g. ignoring file names "mod.main.bicep" in all folders
oh, damn I just noticed you are interested with removal even though it was not yet released π
tbh your case is supported as https://github.com/derberg/manage-files-in-multiple-repositories/blob/main/lib/utils.js#L110 is probably doing /my/path/mod.main.bicep
.includes('mod.main.bicep'). You need to run a test but basically the idea is that you provide patterns, so mod.main.bicep
is a pattern that can match to multiple different files as I'm comparing to file paths.
How do you figure out the repos then? Do you use all inside organization or? I guess I could use topics but then the danger is someone might use the same topic in a different repo and get access to files they shouldn't otherwise have. Is there a reason why specificing a list of repos is not supported through code?
just to clarify, so you mean you want it to run on multiple repos that are not under one org but can be in different orgs and private profiles?
I want to copy to multiple repos which I choose under one organization.
ok, so basically requirement is: copy/remove from just few repos in the same org.
I always recommend topics_to_include
or push to all and filter out exceptions using repos_to_ignore
I never added repos_to_include
as noone ever had a use case to manually specify repo where files should be pushed to. More flexible is topics_to_include
as whoever wants some workflow, do not have to open a PR.
related discussion: https://github.com/derberg/manage-files-in-multiple-repositories/issues/8
The only difference is, I am not copying workflows but rather providing code for customers (for IaC related projects). And I basically want to automatically update a template-repository that customers can always have the low-code, latest version. When there is a push to main on repo A, I copy over some subset of files to repo template-repository (so I don't need to do it manually all the time). I guess I could use topics it's just that in that case, the scope is not in my control. We have 7k repos in organization so I'm worried someone might use the same topic and they get the code all of a sudden.
We have 7k repos in organization
oh π
repos_to_include
is a pretty valid use case then π
Hi,
I love the action that you've created, really useful! I want to check only one functionality possibility. I see from docs that the only way to specify which repo to copy to is when using on workflow_dispatch. Is there any chance that you could add the same functionality by checking an env variable of the same name?
I might be wrong in understanding how the API gets the list of repos, but since I am using a PAT token, and in a big organization, I assume it would list all of those repos. I would be probably fired if I messed with all of the other repos π (I don't have write access on most of them but do have on 15ish repos).
So in summary:
Side question; are regex patterns supported under patterns_to_ignore, patterns_to_remove (neew PR you've created) and similar..? If so, can you show me an example (say I want to remove mod.main.bicep from all subfolders in a repo)