-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add file output to foreach command #141
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great 👍 the file structure is a nice idea, I was assuming it would be a single file containing all the failed logs together, but this is clearer/ easier to navigate.
Might be an idea to explicitly provide the command to run foreach
against only the repos that failed, in case people don't realise that's possible (or even have a --failed
flag that does this automatically?) but perhaps not necessary.
In terms of naming, I was thinking it could be worth adding some sort of timestamp after the repos.txt. Otherwise we need to make sure we tell users to copy the failed/repos.txt before using it in a foreach loop again. |
Thanks for the review, I'd like to merge and release today as there's demand to use this internally. @sledigabel to answer this:
The output repos.txt files also go into a temp output directory, so they don't overwrite one another or overwrite the one in the campaign directory. My assumption is that, if a user wants to do something with lists of successful/failed repos, they can copy the contents and do whatever they want.
I like that - it's a really good idea. My initial thought was "how do we know which the previous run was" but if we were to combine this with @sledigabel's suggestion of timestamped output directories I can see how it could work. I will raise a separate issue, though, as it feels like it would be somewhat complex. |
Fixes #7
When running
turbolift foreach
there are several frequent use cases that are ill catered for:To avoid further cluttering the terminal output, this PR:
org/repo/logs.txt
is repeated for every repository (mirroring the structure of thework
directory):Some notable points:
repos.txt
files are suitable for replay back into turbolift using the-r
option