gruntwork-io / git-xargs

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.
https://blog.gruntwork.io/introducing-git-xargs-an-open-source-tool-to-update-multiple-github-repos-753f9f3675ec
Apache License 2.0
935 stars 62 forks source link

feat: Add --skip-archived-repos flag #33

Closed jphuynh closed 3 years ago

jphuynh commented 3 years ago

Hey folks,

This is another feature I'd be interested to get into git-xargs. I'm using it organization wide and would like to be able to skip the repositories that are archived (Marked as read-only).

I've built and tested the PR.

Please look commit by commit especially for the reason why I updated TestGetFileDefinedRepos.

Note that I didn't add that new flag into stats. Maybe that could be an enhancement follow up.

Let me know if you have any questions.

jphuynh commented 3 years ago

Thanks for the pointers. I pushed the requested changes.

Running locally shows now the reporting:

 ALL REPOS THAT WERE FILTERED OUT WITH THE --SKIP-ARCHIVED-REPOS FLAG
│───────────────────────────────────│──────────────────────────────────────────────────────────────│
│  REPO NAME (185)                  │ REPO URL                                                     │
│───────────────────────────────────│──────────────────────────────────────────────────────────────│