salewski / ads-github-tools

Manage a large number of GitHub repos (command line tools)
https://salewski.github.io/ads-github-tools/
Other
5 stars 0 forks source link

fetch-all-upstreams: add '-k' (--keep-going) option #73

Open salewski opened 3 years ago

salewski commented 3 years ago

This issue pertains to ads-github-fetch-all-upstreams, as shipped with ads-github-tools-0.3.3 (and all previous versions).

This issue is similar in spirit to issue #32, but approaches the problem with a less sophisticated (but perhaps easier to use) mechanism.

When you have a significant number (or pehaps just an unknown number) of problematic repos (e.g., forked repos where the original upstream repo is no longer accessible on GitHub), you sometimes want to tell the ads-github-fetch-all-upstreams to "just deal with the repos that can be dealt with; complain about problematic repos (on stderr), but otherwise keep going".

We should add a command line option to ads-github-fetch-all-upstreams to allow the the user to request the above behavior. For consistence with the ads-github-merge-all-upstreams program, we should name the option -k (--keep-going).

salewski commented 3 years ago

Poor man's workaround for the time being (see also issue #32 for a different workaround): When you hit problematic repos, re-run ads-github-fetch-all-upstreams plugging-in the name of the most recent problematic repo encountered into the sed expresion:

    $ ads-github-fetch-all-upstreams -v $(find . -mindepth 1 -maxdepth 1 -type d | sed -ne 's,^[.]/,,p' | sort | sed -e '0,/^PROBLEMATIC_REPO_NAME$/d')

That has the effect of skipping over all of the repos through the one named. You will need to do the above once for every problematic repo you encounter, so with more than a few it will get tedious fast.