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

Repos file from command line #74

Closed
arnaugm opened this issue Feb 11, 2022 · 1 comment · Fixed by #75
Closed

Repos file from command line #74

arnaugm opened this issue Feb 11, 2022 · 1 comment · Fixed by #75
Labels

Comments

@arnaugm
Copy link

arnaugm commented Feb 11, 2022

When running large campaigns it's possible you need to experiment changes with a subsection of your repositories. Currently you need to delete or comment out the repositories you don't want to be taken into account before running any turbolift command.
It would be useful to provide a command line parameter to specify the file to be used as a repository list instead of copy pasting the content into the repos.txt file.
The repos.txt file would continue being the default value.

turbolift clone --repos=test-repos.txt
turbolift foreach --repos=test-repos.txt rm somefile

or

turbolift --repos=test-repos.txt clone
turbolift --repos=test-repos.txt foreach rm somefile
@sledigabel
Copy link
Contributor

Nice suggestion @arnaugm 👍

sledigabel added a commit that referenced this issue Feb 16, 2022
Fixes #74

Adds a new flag for all commands `--repos=<filename>`, which gives the
ability to select a different file from the default `repos.txt` one.
sledigabel added a commit that referenced this issue Apr 28, 2022
Fixes #74

Adds a new flag for all commands `--repos=<filename>`, which gives the
ability to select a different file from the default `repos.txt` one.
sledigabel added a commit that referenced this issue Jun 28, 2022
Fixes #74

Adds a new flag for all commands `--repos=<filename>`, which gives the
ability to select a different file from the default `repos.txt` one.
sledigabel added a commit that referenced this issue Jun 19, 2023
* Optional repo file

Fixes #74

Adds a new flag for all commands `--repos=<filename>`, which gives the
ability to select a different file from the default `repos.txt` one.

* Fixing defaultOptions naming

* Renaming test

* Fix typo on CampaignOptions

* Updates following PR

- Changed error text to include filename last

Signed-off-by: Sebastien Le Digabel <sledigabel@gmail.com>

* Adding repofile to update_pr

* Rebasing after #67

The `pr-status` command was added after and needed the extra danse to
include the new repo file option.

Also renamed the `pr_status` package into `prstatus` as gofumpt told me
packages should not include underscores.
https://go.dev/blog/package-names

* Changed the campaign start message with the repo filename

.. addressing the PR comment.
Also renamed the update_prs package name for the same reason as the
pr_status one.

* Fixing the parsing for foreach

Adding a manual parsing of the foreach parameters and extra testing.
Also added some details in the Readme

* Rephrasing comment in foreach

* Removing extraneous comment

---------

Signed-off-by: Sebastien Le Digabel <sledigabel@gmail.com>
Co-authored-by: Cat from Catalyst <catscanner@users.noreply.github.com>
Co-authored-by: Richard North <rich.north@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants